aboutsummaryrefslogtreecommitdiff
path: root/cordova/node_modules/xml-escape/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'cordova/node_modules/xml-escape/README.md')
-rwxr-xr-xcordova/node_modules/xml-escape/README.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/cordova/node_modules/xml-escape/README.md b/cordova/node_modules/xml-escape/README.md
new file mode 100755
index 0000000..5faf9f9
--- /dev/null
+++ b/cordova/node_modules/xml-escape/README.md
@@ -0,0 +1,38 @@
+xml-escape
+==========
+
+Escape XML in javascript (NodeJS)
+
+npm install xml-escape
+
+```javascript
+// Warning escape is a reserved word, so maybe best to use xmlescape for var name
+var xmlescape = require('xml-escape');
+
+xmlescape('"hello" \'world\' & false < true > -1');
+
+// output
+// '&quot;hello&quot; &apos;world&apos; &amp; false &lt; true &gt; -1'
+
+// don't escape some characters
+xmlescape('"hello" \'world\' & false < true > -1', '>"&')
+
+// output
+// '"hello" &apos;world&apos; & false &lt; true > -1'
+```
+
+
+There is also now an ignore function thanks to @jayflo
+
+```javascript
+esc = require('./');
+
+ignore = '"<&'
+// note you should never ignore an &
+output = esc('I am "<&not>" escaped', ignore)
+console.log(output)
+
+//I am "<&not&gt;" escaped
+```
+
+[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/miketheprogrammer/xml-escape/trend.png)](https://bitdeli.com/free "Bitdeli Badge")