From a2db60bed810449e30e54df9e74ca9d29fb0d681 Mon Sep 17 00:00:00 2001 From: nightwing Date: Mon, 4 May 2015 17:27:02 +0400 Subject: [PATCH] fix escaping of uppercase script tags in JSONToJS --- node_modules/connect-architect/connect.render.ejs/render-ejs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node_modules/connect-architect/connect.render.ejs/render-ejs.js b/node_modules/connect-architect/connect.render.ejs/render-ejs.js index 708745fe..9a544416 100644 --- a/node_modules/connect-architect/connect.render.ejs/render-ejs.js +++ b/node_modules/connect-architect/connect.render.ejs/render-ejs.js @@ -7,7 +7,7 @@ module.exports = function(options, imports, register) { imports["connect.render"].registerEngine("ejs", createView); ejs.filters.JSONToJS = function(obj, indent) { - return JSON.stringify(obj, null, indent).replace(/<\/?script|[\u2028\u2029]/g, function(a) { + return JSON.stringify(obj, null, indent).replace(/<\/?script|[\u2028\u2029]/ig, function(a) { var h = a.charCodeAt(0).toString(16); return (h.length == 2 ? "\\x" : "\\u") + h + a.substr(1); });