I have Googled my brains out and can\'t figure out how to make this work. Here is what I\'m trying to do:
HTML:
"Hi, my n
I prepared some days ago a bin with some different approaches: http://jsbin.com/urazer/4/edit
My favorite:
var text = ""); var html = text.replace(/[<&>'"]/g, function(c) { return "" + c.charCodeAt() + ";"; });