mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
fix escaping of uppercase script tags in JSONToJS
This commit is contained in:
parent
8a88de1656
commit
a2db60bed8
2
node_modules/connect-architect/connect.render.ejs/render-ejs.js
generated
vendored
2
node_modules/connect-architect/connect.render.ejs/render-ejs.js
generated
vendored
@ -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);
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user