Copied to clipboard

Flag this post as spam?

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


  • Peter S 169 posts 587 karma points
    May 28, 2010 @ 13:37
    Peter S
    0

    HTML-tags are printed as clear text

    I've created a macro that fetches a property called slideContent from the pages in a branch in my website to be used in a slideshow on the start page. The information it gets is presented with the HTML-tags in clear text instead of formatting the text as I designed them when creating the slide pages.

    What did I do wrong here? I'm new to umbraco and XSLT so it might just be a basic error, maybe not.

    Here's a part of the macro code:

    <xsl:variable name="slideSource" select="/macro/slideSource"/>
    
    <xsl:template match="/">
    
    <div id="slideContainer">
        <ul id="slides1">
            <xsl:for-each select="umbraco.library:GetXmlNodeById($slideSource)/node [string(data [@alias='umbracoNaviHide']) != '1']">
                <li>
                    <div class="Slide">
                        <xsl:value-of select="data [@alias = 'slideContent']"/>
                    </div>
                </li>
            </xsl:for-each>
        </ul>
    </div>
    
    <br />
    
    </xsl:template>
  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    May 28, 2010 @ 13:45
    Sebastiaan Janssen
    0

    Add disable-output-escaping="yes" to your value-of selects, like so:

    <xsl:value-of select="data [@alias = 'slideContent']" disable-output-escaping="yes" />
  • Bram Loquet 72 posts 102 karma points
    May 28, 2010 @ 14:34
    Bram Loquet
    0

     

    disable-output-escaping="yes" wil do the tric

     

  • Peter S 169 posts 587 karma points
    May 28, 2010 @ 14:34
    Peter S
    0

    I figured it would be an easy thing to fix. Thanks!

  • 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