Strip only one wildcard

issue11682
review443571003
This commit is contained in:
Cédric Krier
2022-09-16 23:36:30 +02:00
parent 05f9e6081b
commit bfc3ff436d
+3 -5
View File
@@ -1890,11 +1890,9 @@
is_full_text: function(value, escape) {
escape = escape || '\\';
var escaped = value;
while (escaped.charAt(0) == '%') {
escaped = escaped.substring(1);
}
while (escaped.charAt(escaped.length - 1) == '%') {
escaped = escaped.substring(0, escaped.length - 1);
if ((escaped.charAt(0) == '%') &&
(escaped.charAt(escaped.length - 1) == '%')) {
escaped = escaped.slice(1, -1);
}
escaped = escaped
.replace(escape + '%', '')