Remove Special Characters Function
Which ever characters are allowed, provide it in the select. Anything other than provided characters will be considered as special characters.
<xsl:function name="stripSpecialChars">
<xsl:param name="string" />
<xsl:variable name="AllowedSymbols" select ="'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789()*%$#@!~<>,.?[]=- + /\ '"/>
<xsl:value-of select="translate($string,translate($string, $AllowedSymbols, ''),' ')"/>
</xsl:function>
<xsl:value-of select="stripSpecialChars($string)"/>
For your information -
< ---> Less Than Symbol
> ---> Greater Than Symbol
No comments:
Post a Comment