Replace illegal XML characters from text content
npm install illegal-xml-sanitizerRemoves/replaces invalid XML chracters from strings
var xmlSanitize = require('');
//replace invalid characters by empty string
xmlSanitize("\uFFFFab", ''); // "ab"//empty string is a default value so you could write just:
xmlSanitize("\uFFFFab"); // "ab"
``Note, that if a surrogate pair character (\uD800-\uDFFF) is found, the following character is removed as well