X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/73e2d98ea8bb1cae1c8d8b0cbdede66b26a05da6..e2d769b29016dcb4e2294646f52a09d777a724d1:/stgit/commands/common.py diff --git a/stgit/commands/common.py b/stgit/commands/common.py index f7301da..2e1ba7a 100644 --- a/stgit/commands/common.py +++ b/stgit/commands/common.py @@ -136,7 +136,7 @@ def name_email(address): """Return a tuple consisting of the name and email parsed from a standard 'name ' string """ - address = re.sub('([^\w\s<>@.])', '\\\\\\1', address) + address = re.sub('[\\\\"]', '\\\\\g<0>', address) str_list = re.findall('^(.*)\s*<(.*)>\s*$', address) if not str_list: raise CmdException, 'Incorrect "name " string: %s' % address @@ -147,7 +147,7 @@ def name_email_date(address): """Return a tuple consisting of the name, email and date parsed from a 'name date' string """ - address = re.sub('([^\w\s<>@.])', '\\\\\\1', address) + address = re.sub('[\\\\"]', '\\\\\g<0>', address) str_list = re.findall('^(.*)\s*<(.*)>\s*(.*)\s*$', address) if not str_list: raise CmdException, 'Incorrect "name date" string: %s' % address