changeset ee18cb647324 in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset&node=ee18cb647324
description:
        Strip only one wildcard

        issue11682
        review443571003
diffstat:

 tryton/common/domain_parser.py |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r a3efe6c4c1b8 -r ee18cb647324 tryton/common/domain_parser.py
--- a/tryton/common/domain_parser.py    Thu Sep 15 21:39:42 2022 +0200
+++ b/tryton/common/domain_parser.py    Fri Sep 16 23:36:30 2022 +0200
@@ -110,7 +110,9 @@
 
 
 def is_full_text(value, escape='\\'):
-    escaped = value.strip('%')
+    escaped = value
+    if escaped.startswith('%') and escaped.endswith('%'):
+        escaped = escaped[1:-1]
     escaped = escaped.replace(escape + '%', '').replace(escape + '_', '')
     if '%' in escaped or '_' in escaped:
         return False

Reply via email to