Commit d15ccabb authored by Dan Pascu's avatar Dan Pascu

Allow hashes in the path section of a http URL

parent 38357ad9
......@@ -1496,11 +1496,11 @@ del ui_class, base_class
#
class HtmlProcessor(object):
_autolink_re = [#re.compile(r"(?P<body>https?://(?:[^:@]+(?::[^@]*)?@)?(?P<host>[a-z0-9.-]+)(?::\d*)?(?:/[\w/%!$@*&='~():;,.+-]*(?:\?[\w%!$@*&='~():;,.+-]*)?)?)", re.I|re.U),
_autolink_re = [#re.compile(r"(?P<body>https?://(?:[^:@]+(?::[^@]*)?@)?(?P<host>[a-z0-9.-]+)(?::\d*)?(?:/[\w/%!$@#*&='~():;,.+-]*(?:\?[\w%!$@*&='~():;,.+-]*)?)?)", re.I|re.U),
re.compile(r"""
(?P<body>
https?://(?:[^:@]+(?::[^@]*)?@)?(?P<host>[a-z0-9.-]+)(?::\d*)? # scheme :// [ user [ : password ] @ ] host [ : port ]
(?:/(?:[\w/%!$@*&='~:;,.+-]*(?:\([\w/%!$@*&='~:;,.+-]*\))?)*)? # [ / path]
(?:/(?:[\w/%!$@*&='~:;,.+-]*(?:\([\w/%!$@#*&='~:;,.+-]*\))?)*)? # [ / path]
(?:\?(?:[\w%!$@*&='~:;,.+-]*(?:\([\w%!$@*&='~:;,.+-]*\))?)*)? # [ ? query]
)
""", re.I|re.U|re.X),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment