Escape the base URL before adding it to the regexp
This commit is contained in:
parent
a7e278a20d
commit
27aa772ef5
1 changed files with 1 additions and 1 deletions
|
|
@ -130,7 +130,7 @@ class URL(object):
|
||||||
|
|
||||||
for regex in self.urls:
|
for regex in self.urls:
|
||||||
if regex.startswith('/'):
|
if regex.startswith('/'):
|
||||||
regex = base + regex
|
regex = re.escape(base) + regex
|
||||||
m = re.match(regex, url)
|
m = re.match(regex, url)
|
||||||
if m:
|
if m:
|
||||||
return m
|
return m
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue