修复空字符串替换bug

This commit is contained in:
q4speed 2020-05-28 17:22:42 +08:00
parent de13d7866a
commit 08253e818e
1 changed files with 1 additions and 0 deletions

View File

@ -543,6 +543,7 @@ class JMXGenerator {
}
replace(str) {
if (!str) return str;
return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/'/g, "&apos;").replace(/"/g, "&quot;");
}