aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/ejs/lib/utils.js
diff options
context:
space:
mode:
authorTeddy Wing2014-10-30 20:27:55 -0400
committerTeddy Wing2014-10-30 20:27:55 -0400
commitfb4b26ac3aa96432fabeaa5b180690a7f5e3c981 (patch)
treef3d9c7d231569417f72aab4e12b26d76e0cfed68 /node_modules/ejs/lib/utils.js
parent65600960507d714053d6c7ba99b8e3ced1d6761f (diff)
downloadsipping-point-fb4b26ac3aa96432fabeaa5b180690a7f5e3c981.tar.bz2
Add node_modules/
Diffstat (limited to 'node_modules/ejs/lib/utils.js')
-rw-r--r--node_modules/ejs/lib/utils.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/node_modules/ejs/lib/utils.js b/node_modules/ejs/lib/utils.js
new file mode 100644
index 0000000..8df6c6a
--- /dev/null
+++ b/node_modules/ejs/lib/utils.js
@@ -0,0 +1,24 @@
+
+/*!
+ * EJS
+ * Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca>
+ * MIT Licensed
+ */
+
+/**
+ * Escape the given string of `html`.
+ *
+ * @param {String} html
+ * @return {String}
+ * @api private
+ */
+
+exports.escape = function(html){
+ return String(html)
+ .replace(/&(?!#?[a-zA-Z0-9]+;)/g, '&amp;')
+ .replace(/</g, '&lt;')
+ .replace(/>/g, '&gt;')
+ .replace(/'/g, '&#39;')
+ .replace(/"/g, '&quot;');
+};
+