On 2017-05-16 14:28 -0700 Rich Morin wrote:
> Although ERB is certainly able to make these sorts of substitutions,
> it can also do far more. Indeed, it can run any code that some
> miscreant might decide to put in a document. So, it's a bit *too
> *powerful for this task.
Yes, as usual and with all technologies you have to make certain that
nothing bad happens. If you allow input for ERB to be provided by an
user, many things can go wrong. Therefore many websites use Liquid or
another templating engine. However, I don't think that Liquid, HAML,
Slim or any such templating engine would allow you to do what you want.
> Given that kramdown already supports abbreviations, would there be any
> harm in allowing them to be used in the URL section of a link?
Yes, the harming being that it just doesn't make sense, in itself and
for kramdown. Again, this is not something that kramdown was built for,
you want a pre-processor for that. And if you don't like ERB, then just
build your own pre-processor that does *just* what you want. This could
easily be done with Regexps in a few lines of code and nobody else's
converted documents would suddenly and subtly change.
Cheers,
Thomas