PR#1297: Support tilde in search

Merges #1297
https://pagure.io/koji/pull-request/1297

Fixes: #1294
https://pagure.io/koji/issue/1294
Cannot search build with tilde
This commit is contained in:
Mike McLean 2019-03-22 10:18:25 -04:00
commit 5146e917af

View file

@ -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