This question is locked. New answers and comments are not allowed.
Hi
I have implemented a client template in my telerik grid as below .
When ever there is apostrophe in FirstName value, the html is not getting generated properly in client. it is like -
if there is no apostrophe in FirstName value, the html is getting genarated perfectly fine like -
In client template, I have also implement a function removeSpecialCharacter to escape special character ' but still having the problem.The function is as follow :-
Could you pls look into this and let me know the issue? Thanks a lot in advance...
I have implemented a client template in my telerik grid as below .
ClientTemplate("<a href='javascript:viewUser(\"<#= Column1 #>\", \"<#= Column2 #>\", \"<#= Column3 #>\",\"<#= removeSpecialCharacter(FirstName) #>\",\"<#= Column4 #>\")'><#= Column5#>...</a>")When ever there is apostrophe in FirstName value, the html is not getting generated properly in client. it is like -
<a href="javascript:viewUser("Test1", "Test3", "test4","\" ?,?test5?)?="">Display</a>if there is no apostrophe in FirstName value, the html is getting genarated perfectly fine like -
<a href="javascript:viewUser("test1", "test2", "test3","test4","test5")">Display</a>In client template, I have also implement a function removeSpecialCharacter to escape special character ' but still having the problem.The function is as follow :-
function removeSpecialCharacter(inputString){ return inputString.replace("'", "\\'"); }Could you pls look into this and let me know the issue? Thanks a lot in advance...