Copied to clipboard

Flag this post as spam?

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


  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jan 19, 2011 @ 09:37
    Sebastiaan Janssen
    0

    disable-output-escaping not working

    So here's the thing, I have a piece of XML, generated by Contour. I am using it in a custom workflow item (adapted from the default "Send XSLT translated e-mail").

    It's all very unexciting, the transform looks like this:

    Umbraco.Forms.Data.XsltHelper.TransformXML(xml, XsltFile, null);

    Now, in the xml variable there's this bit of XML:

    <value key="Dit is een extra item, &quot;test&quot; belangrijk vinkje!|Wat te doen met spaargeld: Sparen of Beleggen? "><![CDATA[Dit is een extra item, &quot;test&quot; belangrijk vinkje!|Wat te doen met spaargeld: Sparen of Beleggen?]]></value>

    This is a pipe-seperated value that I'm splitting up in XSLT like so:

      <xsl:variable name="categories" select="umbraco.library:Split(.//value, '|')" />
      <xsl:for-each select="$categories/value">
        <xsl:value-of select="." disable-output-escaping="yes"/>
        <br />
      </xsl:for-each>

    This works fine except for one little thing:

    &quot;test&quot;

    turns into 

    &amp;quot;test&amp;quot;

    But I am telling it do disable the output escaping, right? So why is that not working?

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 8x admin c-trib
    Jan 19, 2011 @ 10:20
    Chriztian Steinmeier
    1

    Hi Sebastiaan,

    Can you try to circumvent the library call to Split() - say, something like this:

    <xsl:value-of select="value[1]" disable-output-escaping="yes" />

    (Make sure to pick a specific <value> node if there are more than one)...?

    Just to rule out that part of the equation - I'd say there's a good chance of discovery there...

    /Chriztian

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jan 19, 2011 @ 10:49
    Sebastiaan Janssen
    0

    Meh, I was just being an idiot! Forgot to upload the new XSLT file to the workflow..  lol!

    But it was your answer that made me realize that, so thank you very much! :-)

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 8x admin c-trib
    Jan 19, 2011 @ 10:59
    Chriztian Steinmeier
    0

    Oh man; and here we thought we had a real problem to solve... :-)

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft