HTML Markup is rendered instead of HTML

Topics: General
Jul 4, 2011 at 6:58 AM


I put some HTML content in Page datatype (FieldName: "HTMLText", FieldType: String, Widget: VisualXHtmlEditor). When I want to add some data, the VisualXHtmlEditor displays and I can insert/format HTML text. So far so good. But when I use a function to render the HTML text on my page, e.g.

      <xsl:value-of select="@HTMLText" />

the HTML Markup is rendered (with all angle brackets etc.), not the formatted HTML text.

What am I doing wrong?


Jul 4, 2011 at 7:34 AM
Edited Dec 18, 2014 at 7:15 AM
Jul 4, 2011 at 7:34 AM


In an XSLT Function you should change <xsl:value-of select="@HTMLText" /> to <xsl:copy-of select="Parser:ParseWellformedDocumentMarkup(@HTMLText)" xmlns:Parser="#MarkupParserExtensions" /> and ensure that 'Function calls' has a call to the Composite.Xslt.Extensions.MarkupParser function.

For more information read this article - How to parse an XHTML value from a data field used in XSLT functions?

Jul 4, 2011 at 12:05 PM