fix #122
Some checks failed
CodeQL / Analyze (csharp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled

This commit is contained in:
Namhyeon Go 2024-08-08 11:07:52 +09:00 committed by GitHub
parent b2433e9057
commit 1a4931e283
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -771,6 +771,14 @@ var HTTPObject = function(engine) {
s2 = null,
s3, s4;
// fix #122
if (str.indexOf(L) == 0) {
try {
JSON.parse(str);
return str;
} catch (e) {}
}
while (Lpos > -1 && Rpos > -1) {
s0 = str.substring(Lpos + 1, Rpos);
s2 = '';
@ -796,12 +804,7 @@ var HTTPObject = function(engine) {
s2 = this.variables[s3];
}
} else {
// fix #122
try {
s2 = JSON.stringify(JSON.parse(L + s3 + R));
} catch (e) {
s2 = s3;
}
s2 = s3;
}
}
str = str.substring(0, Lpos) + s2 + str.substring(Rpos + 1);