Everything To HTML-Entity Bookmarklet

Posted at


javascript:(function(){prompt("output:",prompt("∞ to HTML-Entity:","<div>❝Likė A Ƀoŝš❞ ©®</div>").replace(/[\\u00A0-\\u9999\\<\\>\\&\\'\\"\\\\\\/]/gim,function(c){return '&#'+c.charCodeAt(0)+';'}));return true;}());



naturally you can specify every little "problematic" character such as \\s for whitespace (TAB, SPACE, etc..) dash, underscore etc...

By The Way
- You can find many unicode icons in UMOJI - U(nicode E)moji (The Page is Copy&Paste Friendly!)
- Full table of HTML5 supported HTML-Entity to.. and from.. conversion can be found at my GitHub GIST - HTML Entity Conversion Table (Unicode-HTML Entity-Unicode)