浏览代码

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>
Mayx 6 月之前
父节点
当前提交
7c256532d3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Live2dHistoire/live2d/js/message.js

+ 1 - 1
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;