Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1x 1x 1x | import {toStr} from "../helpers/string/to_string";
const unescapeCharsMap = {
'<': /(<)|(�*3c;)|(�*60;)/gi,
'>': /(>)|(�*3e;)|(�*62;)/gi,
'&': /(&)|(�*26;)|(�*38;)/gi,
'"': /(")|(�*22;)|(�*34;)/gi,
"'": /(�*27;)|(�*39;)/gi,
'`': /(�*60;)|(�*96;)/gi,
};
const chars = Object.keys(unescapeCharsMap);
function reduceUnescapedString(string, key) {
return string.replace(unescapeCharsMap[key], key);
}
export const unescapeHtml = s => chars.reduce(reduceUnescapedString, toStr(s)) |