Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I have an RSS feed for which I need to list the latest news items using xslt.
I use this syntax:
<p><xsl:value-of select="umbraco.library:StripHtml(translate(normalize-space(CoditExt:RemoveBetween('<p class="csharpcode"><style type="text/css">', '</style></p>',./description, 'true', 'true')),' ',''))" disable-output-escaping="yes"/>
With the code line above, the html is stripped and inline styling is stripped. The problem I have is that I can't get rid of the tags in the description. How can I remove these non breaking spaces?
grts,
Kim
Hey Kim,
I'm not sure I understand exactly what you're trying to do but you can use the built in Umbraco replace as described here http://our.umbraco.org/wiki/reference/umbracolibrary/replace
You might want to put your first result into a variable and then strip out the something like this
<xsl:value-ofselect="umbraco.library:Replace($someVariable', ' ', '')"/>
Rich
That should have read (can't edit)
<xsl:value-of select="umbraco.library:Replace($someVariable', ' ', '')"/>
Hi Rich,
I tried the umbraco:library:Replace function, but that didn't solve the problem...the non breaking spaces are still there :s
Ahh, ok, must be something to do with the encoding, sure I've seen something like this before...
Did you try <xsl:value-of select="umbraco.library:Replace($someVariable', '&nbsp; ', '')"/> instead?
Yes, it solved the problem!! Tnx! :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Remove
Hi,
I have an RSS feed for which I need to list the latest news items using xslt.
I use this syntax:
<p><xsl:value-of select="umbraco.library:StripHtml(translate(normalize-space(CoditExt:RemoveBetween('<p class="csharpcode"><style type="text/css">', '</style></p>',./description, 'true', 'true')),' ',''))" disable-output-escaping="yes"/>
With the code line above, the html is stripped and inline styling is stripped. The problem I have is that I can't get rid of the tags in the description. How can I remove these non breaking spaces?
grts,
Kim
Hey Kim,
I'm not sure I understand exactly what you're trying to do but you can use the built in Umbraco replace as described here http://our.umbraco.org/wiki/reference/umbracolibrary/replace
You might want to put your first result into a variable and then strip out the something like this
Rich
That should have read (can't edit)
<xsl:value-of select="umbraco.library:Replace($someVariable', ' ', '')"/>
Rich
Hi Rich,
I tried the umbraco:library:Replace function, but that didn't solve the problem...the non breaking spaces are still there :s
grts,
Kim
Ahh, ok, must be something to do with the encoding, sure I've seen something like this before...
Did you try <xsl:value-of select="umbraco.library:Replace($someVariable', '&nbsp; ', '')"/> instead?
Rich
Yes, it solved the problem!! Tnx! :)
is working on a reply...