[Security] Fix ReDoS
Fix ReDoS
This commit is contained in:
parent
f766babf5e
commit
e99c7aa15b
|
|
@ -143,7 +143,7 @@ function push_uniq(array, el) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function string_template(text, props) {
|
function string_template(text, props) {
|
||||||
return text.replace(/\{([^}]+)\}/g, function(str, p) {
|
return text.replace(/\{([^{}]+)\}/g, function(str, p) {
|
||||||
var value = props[p];
|
var value = props[p];
|
||||||
return value instanceof AST_Node ? value.print_to_string() : value;
|
return value instanceof AST_Node ? value.print_to_string() : value;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user