mirror of
https://github.com/Mabbs/mabbs.github.io
synced 2025-07-20 05:02:01 +00:00
Potential fix for code scanning alert no. 5: Incomplete string escaping or encoding
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
parent
d60d41a008
commit
7c256532d3
@ -29,7 +29,7 @@ if (!norunFlag) {
|
|||||||
var tokenReg = /(\\)?\{([^\{\}\\]+)(\\)?\}/g;
|
var tokenReg = /(\\)?\{([^\{\}\\]+)(\\)?\}/g;
|
||||||
return template.replace(tokenReg, function (word, slash1, token, slash2) {
|
return template.replace(tokenReg, function (word, slash1, token, slash2) {
|
||||||
if (slash1 || slash2) {
|
if (slash1 || slash2) {
|
||||||
return word.replace('\\', '');
|
return word.replace(/\\/g, '');
|
||||||
}
|
}
|
||||||
var variables = token.replace(/\s/g, '').split('.');
|
var variables = token.replace(/\s/g, '').split('.');
|
||||||
var currentObject = context;
|
var currentObject = context;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user