Return to Snippet

Revision: 37672
at December 15, 2010 03:44 by emdin


Initial Code
var text;

if (text.match(/\&[^;]+\;/gi,text) && document) {
    var div = document.createElement('div');
    div.innerHTML = text.replace(/\&amp\;/gi,'&');
    text = div.innerHTML;
}

Initial URL


Initial Description
This code converts decode encoded UTF-8 characters. So á will be converted back to á ("a with acute").

Initial Title
Decode encoded UTF-8 characters

Initial Tags


Initial Language
JavaScript