Share your advanced knowledge/code with the community.
Posts: 30
Joined: Tue Feb 25, 2014 6:49 am

HtmlEncode / Decode

by cederavic Sun Mar 02, 2014 4:50 pm

Two simple proc to encode / decode Html special char :
Code: Select all
Procedure.s HtmlEncode(toEncode.s)
  !return $('<div/>').text(v_toEncode).html();

Procedure.s HtmlDecode(toDecode.s)
  !return $('<div/>').html(v_toDecode).text();
Return to Tricks 'n' Tips

Who is online

Users browsing this forum: No registered users and 1 guest