strip html tags with xslt
I am busy with a website where customers can edit there profile. They can also use some kind of editor which produces html tags that will be wrapped around the text.
The xml looks something like this:
<p>This is a <b>profile</b> text blablalbla</p><br/>
Now I am creating some kind of master page with links to detail pages. On the detailpages the html has to be output as html code (using disable output-escaping).
On the masterpage I just want this as output:
"This is a profile text blablalbla"
So all the html tags must be ignored or stripped out.
Is this possible with xslt?
Thanks in advance,
Found this template and works fine...
<xsl:when test="contains($text, '<')">
<xsl:value-of select="substring-before($text, '<')"/>
<xsl:with-param name="text" select="substring-after($text, '>')"/>
Use it this way:
<xsl:with-param name="text" select="Profile"/>
Sure, just do
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
I want remove <p> tags from sitecore rich text editor
I want remove <p> tags from sitecore rich text editor in xslt.
Please help on this.
Thanks in advance.
If this is an XSLT question, please show us a sample input document and the output you want from it. Please also explain what you have tried and where you got stuck; this helps us to know how much explanation we need to give in reply. Please also don't assume that anyone on this forum knows anything about the sitecore rich text editor. Finally, please start a new question on a new thread, rather than replying to a thread that is more than five years old.
|All times are GMT -4. The time now is 04:15 PM.|
Powered by vBulletin®
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.