diff options
Diffstat (limited to 'include/functions_search.inc.php')
-rw-r--r-- | include/functions_search.inc.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/functions_search.inc.php b/include/functions_search.inc.php index a043f041c..2ec709936 100644 --- a/include/functions_search.inc.php +++ b/include/functions_search.inc.php @@ -352,6 +352,10 @@ function get_qsearch_like_clause($q, $field) } else { + if ( strcspn($ch, '%_')==0) + {// escape LIKE specials %_ + $ch = '\\'.$ch; + } $crt_token .= $ch; } break; @@ -366,6 +370,10 @@ function get_qsearch_like_clause($q, $field) $state=0; break; default: + if ( strcspn($ch, '%_')==0) + {// escape LIKE specials %_ + $ch = '\\'.$ch; + } $crt_token .= $ch; } break; |