mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Be much more permissive in what we accept in section names; there has been
at least one addition to the set of accepted characters for every release since this module was first added; this should take care of the problem in a more substantial way. This closes SF bug #132288.
This commit is contained in:
parent
d807570ed1
commit
d4df94b56d
1 changed files with 1 additions and 1 deletions
|
@ -387,7 +387,7 @@ class ConfigParser:
|
||||||
# of \w, _ is allowed in section header names.
|
# of \w, _ is allowed in section header names.
|
||||||
SECTCRE = re.compile(
|
SECTCRE = re.compile(
|
||||||
r'\[' # [
|
r'\[' # [
|
||||||
r'(?P<header>[-\w_.*,(){} ]+)' # a lot of stuff found by IvL
|
r'(?P<header>[^]]+)' # very permissive!
|
||||||
r'\]' # ]
|
r'\]' # ]
|
||||||
)
|
)
|
||||||
OPTCRE = re.compile(
|
OPTCRE = re.compile(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue