Copied to clipboard

Flag this post as spam?

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


  • Owen Hope 119 posts 140 karma points
    Nov 12, 2010 @ 18:39
    Owen Hope
    0

    XSLT Value-Of - Getting HTML code, rather than content.

    Hi,

    I am displaying footer images throughout my site using XSLT grabbing the information from a RichText Editor, however the final product displayed is the actual HTML.

    ie: <p><img src="/media/114/logo-footer-harbourair.gif" width="137" height="23" alt="logo-footer-harbourair"/></p> instead of the actual image.

    My XSLT reads:

    <xsl:template match="/">
      <xsl:variable name="homeNode" select="umbraco.library:GetXmlNodeById(1047)"/>
      <xsl:value-of select="$homeNode/footerSponsors"/>
    </xsl:template>

    Where "footerSponsors" is the alias of the RichText Editor.

    Is there a way where I can output the actual content rather than just the HTML code?

    Thanks!

    Owen

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Nov 12, 2010 @ 18:43
    Tom Fulton
    2

    Add the attribute disable-output-escaping="yes" to your value-of tag to render the HTML

    IE:

     <xsl:value-of select="$homeNode/footerSponsors" disable-output-escaping="yes" />
  • Owen Hope 119 posts 140 karma points
    Nov 12, 2010 @ 18:53
    Owen Hope
    0

    Thank you Tom!

Please Sign in or register to post replies

Write your reply to:

Draft