From 7c256532d3e1ac0f8581c52226f92ca678758002 Mon Sep 17 00:00:00 2001 From: Mayx Date: Sat, 7 Jun 2025 22:45:58 +0800 Subject: 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>--- Live2dHistoire/live2d/js/message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Live2dHistoire/live2d/js') diff --git a/Live2dHistoire/live2d/js/message.js b/Live2dHistoire/live2d/js/message.js index 5bd5132..4eb183f 100644 --- a/Live2dHistoire/live2d/js/message.js +++ b/Live2dHistoire/live2d/js/message.js @@ -29,7 +29,7 @@ if (!norunFlag) { var tokenReg = /(\\)?\{([^\{\}\\]+)(\\)?\}/g; return template.replace(tokenReg, function (word, slash1, token, slash2) { if (slash1 || slash2) { - return word.replace('\\', ''); + return word.replace(/\\/g, ''); } var variables = token.replace(/\s/g, '').split('.'); var currentObject = context; -- cgit 1.4.1-2-gfad0