From 5a08608312689f4279e5f8fd30dc37651014aac0 Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Feb 27 2019 00:20:29 +0000 Subject: Support tilde in search Fixes https://pagure.io/koji/issue/1294 Signed-off-by: Miro Hrončok --- diff --git a/www/kojiweb/index.py b/www/kojiweb/index.py index 04248dc..79436a1 100644 --- a/www/kojiweb/index.py +++ b/www/kojiweb/index.py @@ -2215,7 +2215,7 @@ _infoURLs = {'package': 'packageinfo?packageID=%(id)i', 'win': 'archiveinfo?archiveID=%(id)i'} _VALID_SEARCH_CHARS = r"""a-zA-Z0-9""" -_VALID_SEARCH_SYMS = r""" @.,_/\()%+-*?|[]^$""" +_VALID_SEARCH_SYMS = r""" @.,_/\()%+-~*?|[]^$""" _VALID_SEARCH_RE = re.compile('^[' + _VALID_SEARCH_CHARS + re.escape(_VALID_SEARCH_SYMS) + ']+$') _DEFAULT_SEARCH_ORDER = { # For searches against large tables, use '-id' to show most recent first