This SharePoint customization tutorial explains, how to remove unwanted HTML tags from SharePoint.
In real-time, we see unwanted HTML tags in SharePoint Web pages. These get displayed when we open a SharePoint view item or in form display lookup values with special characters.
<a onlink=”OpenpopupPage….>Value </a> while opening the view of an item in the SharePoint, where the items are from look up list.
If you see the form and the items displayed as above, add disable-output-escaping=”yes” as below using SharePoint designer.
After adding this property in xsl tag, the view item will be :
In General XSL
<xsl:value-of select="expression" disable-output-escaping="yes|no" />
XSLT <xsl:value-of> Element: which extracts the value of a selected node and can be used to select the value of an XML element & add it to the output.
- select=”expression” :
This is required.
An XPath expression that specifies which node/attribute to extract the value from. It works like navigating a file system where a forward slash (/) selects subdirectories.
Optional. Default is “no”.
“yes” indicates that special characters (like “<“) should be output as is.
“no” indicates that special characters (like “<“) should be output as “<“.
You may like following SharePoint customization tutorials:
- The Save site as template action is not supported on this site
- Create an application page in SharePoint 2013 using Visual Studio
- SharePoint 2013: Filter and sort List data using AngularJS and REST API
- Draft items not appearing in search results in SharePoint 2013
- SharePoint 2013 Designer error The folder name is not valid
- SharePoint Current user filter web part
- SharePoint 2013 Error Code blocks are not allowed in this file
- Show Ribbon for ListViewWebPart on Page SharePoint
Here we learned how to solve remove unwanted HTML tags from SharePoint 2013.
Download SharePoint Online Tutorial PDF FREE!
Get update on Webinars, video tutorials, training courses etc.