Online Training On SharePoint

Wednesday, 1 July 2009

Conversion of Special Character in SharePoint forms

I was working on a requirement in which we were creating a page in SharePoint using the controls. The users were giving inputs in this field. If the users were giving any special characters such as ">" or "<" they were getting encoded to ">" and "<". Then to overcome this the input field type was converted to SharePoint Control. With this the issue was fixed and the special character was encoded properly except the apostrophe (') special character. This was getting converted to "'". So to fix this issue we have added a the following tag in the xslt-value of tag:

<xsl:value-of select="@comments" disable-output-escaping="yes"/>

This has fixed the issue where the apostrophe was not encoded correctly and showing "'" while displaying the data.
Post a Comment
Related Posts with Thumbnails