I have a HTML-comment like this:
<img class="img--full-width" src="//placehold.it/200x300">
When this renders, I get this:
<img class="im-full-width" src="//placehold.it/200x300">
This is highly amusing. :) This is placed inside of a template page. If I move this to an ordinary, plain and simple ASPX-page it renders perfectly! Does anyone know if EPiServer somehow tries to parse the HTML for links or such?
By default for pages inheriting TemplatePage<T> (that means WebForms templates) EPiServer will hook up a parser that parses through the ResponseStream and rewrite links to FURL fromat.
If you do not want FURL parsing for a specific template you could add HtmlRewriteFilter.OptionFlag to the disable parameter in the constructor. However be aware that no links will be rewritten automatically in that case meaning you need to use e.g. UrlResolver to create FURL links.
Thank you! But that should mean that there's an issue with the parser? For when I disable HtmlRewriteFilter.OptionFlag in the constructor the comment is rendered correctly, but as you said, no links rewritten.
Yes, it is likely an issue with the parser. We are using an external lib for that parsing. It is in our backlog to phase out that parser, but when that will be done have not been decided.