10

I am trying to style an rss feed using xslt. I want to display an image that is stored in the tag on the feed. The problem is it is encoded to display as text on the page instead of being rendered. The following is an example of part of the string.

1). <description>&lt;img src="http&amp;#58;&amp;#47;&amp;#47;buavhw.blu.livefilestore.com&amp;#47;y1ppCokLxFJSG2cmyPdvg...

I had to add extra coding to the string above to get it to appear properly here. The string below is how it appears when I paste it directly into the text box.

2). <description><img src="http&#58;&#47;&#47;buavhw.blu.livefilestore.com&#47;y1ppCokLxFJSG2cmyPdvg...

If I copy and paste it again from the preview window it only then becomes the following string.

3). <description><img src="http://buavhw.blu.livefilestore.com/y1ppCokLxFJSG2cmyPdvg...

John ClearZ
  • 952
  • 2
  • 9
  • 16
  • To format code or XML here, select it in the editor and press Control-K. – John Saunders Jun 13 '10 at 05:12
  • Please, can you state simply: 1. What string you have. 2. To what string you want that converted? Your question right now doesn't provide answers to these questions. It is impossible to guess what you really want. – Dimitre Novatchev Jun 13 '10 at 14:22

1 Answers1

25

I'd suggest you to use an especial property in xsl:value=of tag and that is disable-output-escaping="yes" use like this:

<xsl:value-of select="description" disable-output-escaping="yes"/>
Vadzim
  • 24,954
  • 11
  • 143
  • 151
J.Mohammadi
  • 251
  • 3
  • 3