Looking for old forum posts and information? View the old forum archive here ยป
Welcome to Vortx Community Forum, where you can ask questions and receive answers from the staff at Vortx and other members of the community.

If you had a user account on our previous forums website, you will need to register a new account here.

A static copy of our previous forums website is available online for reference. Click here to access the forum archive.

Learn more about...

AspDotNetStorefront
DotFeed

How to parse HTML content pulled from DB variable?

Hopefully it will be a simple one... I may have done it before but probably it was so many time ago that I really cannot recall... so please help!

laugh

I created a small configuration table where I am saving and pulling from some messages to splash on the screen. The messages have a few embed simple formatting HTML (such as line breaks) and so the xml.config file is displaying the HTML instead to parse it. How can I fix it?

Example, this...

<xsl:value-of select="/root/Messages/MessagesRow/ThankYou"/>

Should display something like...

Thank you very much.
Looking forward to see you again!

Instead it's displaying...

Thank you very much.<br/>Looking forward to see you again!

Any idea? Thanks!

cheeky

closed with the note: This is solved and the answer was tagged as a best one!
asked Jun 8 in MultiStore by Yan Kleber (990 points)
closed Jun 11 by Yan Kleber

1 Answer

+1 vote
 
Best answer
The disable-output-escaping="yes" attribute missing from your xsl:value-of is the issue.
answered Jun 11 by mmcgeachy (4,070 points)
selected Jun 11 by Yan Kleber

EDIT:

Thank you for the heads up.

I have posted before that it didn't work because I was almost totally sure that I have used the disable-output-escaping="yes" attribute and it didn't work...

Anyway, just in case I returned to my code and put the attribute back and IT WORKED. I don't know what hapenned before. Perhaps I am getting too old for this sh*t. LoL.

Thank you very much!

laugh

We are talking about changing <xsl:value-of select="/root/Messages/MessagesRow/ThankYou"/> to <xsl:value-of select="/root/Messages/MessagesRow/ThankYou" disable-output-escaping="yes" /> correct?

If so I need more context as to where the output is. Since it could be something after the xmlpackage transform causing the html escaping.

No worries mmcgeachy look above! You were right since the beggining! wink

...