HTML Markup is rendered instead of HTML

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

Hi,

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.

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

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

What am I doing wrong?

Stephan

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

Hello,

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 1:05 PM

Thanks