mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-15 06:01:04 +00:00
Fix the special char issue
This commit is contained in:
parent
180f037d9f
commit
825b250635
|
@ -593,14 +593,10 @@ var HTTPObject = function(engine) {
|
|||
var Lpos = str.indexOf('{');
|
||||
var Rpos = str.indexOf('}', Lpos + 1);
|
||||
var s0 = '', s1 = [], s2 = null, s3, s4;
|
||||
var regex = /^[\w\-\s]+$/;
|
||||
|
||||
while (Lpos > -1 && Rpos > -1) {
|
||||
s0 = str.substring(Lpos + 1, Rpos);
|
||||
|
||||
if (!regex.test(s0)) {
|
||||
s2 = '{' + s0 + '}';
|
||||
} else {
|
||||
s2 = '';
|
||||
s1 = s0.split(' ');
|
||||
while (s1.length > 0) {
|
||||
s3 = s1.pop();
|
||||
|
@ -622,8 +618,6 @@ var HTTPObject = function(engine) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
str = str.substring(0, Lpos) + s2 + str.substring(Rpos + 1);
|
||||
Lpos = str.indexOf('{');
|
||||
Rpos = str.indexOf('}', Lpos + 1);
|
||||
|
|
Loading…
Reference in New Issue
Block a user