When trying to implement syntax highlighting for Mojolicious templates (highlight.js pull request, mojo pull request), we found that highlight.js can't handle template tags inside javascript strings.

This problem also shows up with the ERB syntax (which I used as reference):

It doesn't happen with PHP tags, which are handled internally in the xml.js language definition:

I suspect this can only be fixed in xml.js, not by modifying an external language definition.