Here's a quick post on how to encode and decode HTML characters in JavaScript using jQuery. I didn't come up with the solution, but I thought it was pretty clever.
function htmlEncode(value){
return $('<div/>').text(value).html();
}
function htmlDecode(value){
return $('<div/>').html(value).text();
}
I was actually looking for this resource a few weeks back. Thanks for sharing with us your wisdom.This will absolutely going to help me in my projects .
Thanksgiving day is around the corner. How are you going to celebrate it? You must have noticed that all places are holding promotional activities to promote sales of their products. No matter the supermarket, store or the mall, you can always get products at much cheaper prices. It is also a good choice to come to 4wowgold.com to get cheap wow gold now. Seize your time.
I was actually looking for this resource a few weeks back. Thanks for sharing with us your wisdom.This will absolutely going to help me in my projects .
ReplyDeleteClassic Dresses
Classic Bridesmaid Dresses
Wedding Dresses with Sleeves
Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.
ReplyDeletehtml5 video player
To see WOW Gold and Buy RS Gold world in a granda of stand.And a heaven in a wild flower.Hold infinity in the palm your hand and eternity in an hour.
DeleteCoach Factory Outlet
ReplyDeleteCoach Factory Outlet
Coach Store Online
Coach Outlet Store Online
Coach Store Online
Coach Outlet
Coach Store Online
Coach Outlet Store Online
Coach Outlet Online
Coach Outlet Online
Coach Outlet Store Online
Coach Outlet
Coach Factory Outlet
Thanksgiving day is around the corner. How are you going to celebrate it? You must have noticed that all places are holding promotional activities to promote sales of their products. No matter the supermarket, store or the mall, you can always get products at much cheaper prices. It is also a good choice to come to 4wowgold.com to get cheap wow gold now. Seize your time.
ReplyDeleteI was trying to use this method to encode ENdash and EMdash but this methos does not work out. can you tell how to encode them.
ReplyDelete