/** Used to map HTML entities to characters. */ | |
var htmlUnescapes = { | |
'&': '&', | |
'<': '<', | |
'>': '>', | |
'"': '"', | |
''': "'", | |
'`': '`' | |
}; | |
/** | |
* Used by `_.unescape` to convert HTML entities to characters. | |
* | |
* @private | |
* @param {string} chr The matched character to unescape. | |
* @returns {string} Returns the unescaped character. | |
*/ | |
function unescapeHtmlChar(chr) { | |
return htmlUnescapes[chr]; | |
} | |
module.exports = unescapeHtmlChar; |