/ Published in: jQuery
Takes a string as an argument and returns it with htmlentities
Usage:
$.htmlentities("hello bob&doug");
Returns:
<body>hello bob&doug</body>
Usage:
$.htmlentities("hello bob&doug");
Returns:
<body>hello bob&doug</body>
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
jQuery.extend({ htmlentities : function(text){ return $('<div/>').text(text).html(); } });