👕 Fix lint issue

This commit is contained in:
Jan Oberhauser
2022-06-14 09:47:54 -07:00
parent eff97e8d67
commit b666116a9c
2 changed files with 7 additions and 8 deletions

View File

@@ -65,11 +65,11 @@ const XML_CHAR_MAP: { [key: string]: string } = {
'>': '>',
'&': '&',
'"': '"',
"'": '''
'\'': ''',
};
export function escapeXml(str: string) {
return str.replace(/[<>&"']/g, function (ch: string) {
return str.replace(/[<>&"']/g, (ch: string) => {
return XML_CHAR_MAP[ch];
});
}