[issue9723] Add shlex.quote

Ezio Melotti report at bugs.python.org
Sat Aug 13 01:21:02 CEST 2011


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

-_find_unsafe = re.compile(r'[^\w\d@%_\-\+=:,\./]').search
+_find_unsafe = re.compile(r'[^\w@%\-\+=:,\./]', re.ASCII).search

FWIW there are still unnecessary escapes before '+' and '.', and possibly '-' ('-' doesn't need escaping only when it's at the end (or beginning) of the regex).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9723>
_______________________________________


More information about the Python-bugs-list mailing list