Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chad 64 posts 128 karma points c-trib
    Sep 25, 2009 @ 08:03
    Chad
    0

    Inline XSLT, prevent html encoding

    Hi,

    I have this in a template I'm working on:

    <umbraco:Item field="parentID" runat="server" xslt="umbraco.library:GetXmlNodeById({0})/data [@alias='bodyText']"></umbraco:Item>

    To display the 'bodyText' of the parent node. The bodyText is a RichTextField, and I cannot seem to prevent it from encoding the html in 'bodyText'.

    When inserting a field in the template, umbraco has 3 different encoding options, 'none', 'url' and 'html'. If I select none, then no attributes are added to the tag - so I presume 'none' is the default - And yet it still is encoding the html.

     

    Any thoughts?

     

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Sep 25, 2009 @ 10:22
    Dirk De Grave
    1

    Hi Chad,

     

    Add 

    xsltDisableEscaping="true"

    as attribute on the umbraco:Item, it should do the trick

     

    Cheers,

    /Dirk

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies