Answer the question
In order to leave comments, you need to log in
How to sanitize such lines?
How to remove all such characters? Some str\u0010ing
Here \u0010
breaks my code
Error: Invalid character in string: Some str�ing at index 33
at XMLStringifier.assertLegalChar (/home/.../node_modules/xmlbuilder/lib/XMLStringifier.js:208:19)
Answer the question
In order to leave comments, you need to log in
Pass the replacement by regular expression:str.replace( /\\u\d{4}/, '')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question