Is there anything embedded in javascript that decodes an entry like "
to " ?
I would need something similar to what is found here: http://www.hashemian.com/tools/html-url-encode-decode.php (the decimal decode).
Is there anything embedded in javascript that decodes an entry like "
to " ?
I would need something similar to what is found here: http://www.hashemian.com/tools/html-url-encode-decode.php (the decimal decode).
Use the String.fromCharCode
method. Example:
var entity = '"';
var numeric = /\d+/.exec(entity);
var decoded = String.fromCharCode(numeric);
A general HTML entity-to-character method is:
var dummy = document.createElement('textarea');
dummy.innerHTML = entity;
var decoded = dummy.value;