Escape the base URL before adding it to the regexp

This commit is contained in:
Laurent Bachelier 2014-03-22 02:09:07 +01:00 committed by Romain Bignon
commit 27aa772ef5

View file

@ -130,7 +130,7 @@ class URL(object):
for regex in self.urls:
if regex.startswith('/'):
regex = base + regex
regex = re.escape(base) + regex
m = re.match(regex, url)
if m:
return m