xml-sanitizer

2.0.0 • Public • Published

xml-sanitizer

Sanitize out invalid xml characters from your strings

Purpose

Have you ever tried to put the output of a child process into an xml document before? Certain CLI utilities will generate characters that look great on your terminal, but will cause mayhem in XML world. This package is a simply regular expression that will clean all of that up for you!

Usage

var xmlSanitizer = require('xml-sanitizer');
var someText = 'This is invalid \u0000';

xmlSanitizer(someText); \\ 'This is invalid '
xmlSanitizer(someText, '🎉'); \\ 'This is invalid 🎉'

License

MIT.

You can find a copy in LICENSE in the root directory of this project.

Readme

Keywords

none

Package Sidebar

Install

npm i xml-sanitizer

Weekly Downloads

275

Version

2.0.0

License

MIT

Unpacked Size

7.73 kB

Total Files

9

Last publish

Collaborators

  • knish
  • mylesborins