Fix for ampersand on values (JS only)
This commit is contained in:
parent
bf4c67034a
commit
3596991362
@ -93,9 +93,9 @@ tree.Filterset.prototype.toJS = function(env) {
|
|||||||
}
|
}
|
||||||
var attrs = "data";
|
var attrs = "data";
|
||||||
if (op === '=~') {
|
if (op === '=~') {
|
||||||
return "(" + attrs + "['" + filter.key.value + "'] + '').match(" + (val.is === 'string' ? "'" + val.toString().replace(/'/g, "\\'") + "'" : val) + ")";
|
return "(" + attrs + "['" + filter.key.value + "'] + '').match(" + (val.is === 'string' ? "'" + val.toString().replace(/'/g, "\\'").replace(/&/g, '&') + "'" : val) + ")";
|
||||||
}
|
}
|
||||||
return attrs + "['" + filter.key.value + "'] " + op + " " + (val.is === 'string' ? "'" + val.toString().replace(/'/g, "\\'") + "'" : val);
|
return attrs + "['" + filter.key.value + "'] " + op + " " + (val.is === 'string' ? "'" + val.toString().replace(/'/g, "\\'").replace(/&/g, '&') + "'" : val);
|
||||||
}).join(' && ');
|
}).join(' && ');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user