Alternative to Server.HtmlEncode in Javascript

You can encode HTML code on the server side using’s  Server.HtmlEncode. But if you want to do it on the clientside is there any way to do that. There is no built in function in Javascript to achieve the same. However using Regular Expression, you can do it easily.

Javascript Code:

function  jsHTMLEndcoder(strHTML){

var rtn=null;





return rtn;



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s