Strange HTML-comment issue with EPiServer

Vote:
 

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?

#79269
Dec 12, 2013 10:23
Vote:
 

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. 

#79299
Dec 12, 2013 15:59
Vote:
 

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.

#79303
Dec 12, 2013 17:25
Vote:
 

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.

#79330
Dec 13, 2013 11:54
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.