SyntaxFix
Write A Post
Hire A Developer
Questions
Just reposting @bucababy's answer as a "bookmarklet", as it's sometimes easier than using those lookup pages:
alert(prompt('Enter characters to htmlEncode', '').replace(/[\u00A0-\u2666]/g, function(c) { return '&#'+c.charCodeAt(0)+';'; }));