fixed regex in urlparse.py to not parse commands, also made it respece paths

This commit is contained in:
neersighted 2012-03-01 22:50:47 -08:00
parent fa99d1eef5
commit 0f2206f68f
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ def parse(match):
except:
return "fail"
@hook.regex(r'([a-zA-Z]://|www\.)?[^ ]+(\.[a-z]+)+')
@hook.regex(r'(^[^\.])([a-zA-Z]://|www\.)?[^ ]+(\.[a-z]+)\/(.*)')
def urlparser(match, say=None):
url = urlnorm.normalize(match.group().encode('utf-8'))
if url[:7] != "http://":