📅  最后修改于: 2022-03-11 15:04:31.545000             🧑  作者: Mango
function escapeHTML(text) {
var replacements= {"<": "<", ">": ">","&": "&", """: """};
return text.replace(/[<>&"]/g, function(character) {
return replacements[character];
});
}