html entities
by devdev
HTML
<b>grassetto (interpretato)</b>
<br>
<b>grassetto (non interpretato, codifica manuale)</b>
<br>
<script>
var testo='<b>grassetto (not interpretato, codifica mediante script)</b>';
var encodeHtmlEntity = function(str) {
var buf = [];
for (var i=str.length-1;i>=0;i--) {
buf.unshift(['&#', str[i].charCodeAt(), ';'].join(''));
}
return buf.join('');
};
document.write(encodeHtmlEntity(testo));
</script>
<br>
<a href="http://www.w3schools.com/html/html_entities.asp">
http://www.w3schools.com/html/html_entities.asp
</a>