Update:Remove rss feed dependencies add node-xml lib

This commit is contained in:
advplyr 2022-06-07 19:25:14 -05:00
parent 46fc89e247
commit 03bffb725a
9 changed files with 556 additions and 105 deletions

View file

@ -0,0 +1,17 @@
var XML_CHARACTER_MAP = {
'&': '&',
'"': '"',
"'": ''',
'<': '&lt;',
'>': '&gt;'
};
function escapeForXML(string) {
return string && string.replace
? string.replace(/([&"<>'])/g, function (str, item) {
return XML_CHARACTER_MAP[item];
})
: string;
}
module.exports = escapeForXML;