Allow apostrophe in URL regex
Apostrophe is a valid URL character. Example: https://en.wikipedia.org/wiki/Benford's_law
This commit is contained in:
parent
884d22938b
commit
1d3ec44919
|
@ -151,7 +151,7 @@ class HTMLProcessor:
|
||||||
if isinstance(r, str) else r for r in [
|
if isinstance(r, str) else r for r in [
|
||||||
# Normal :// URLs
|
# Normal :// URLs
|
||||||
(r"(?P<body>[a-z\d]+://(?P<host>[a-z\d._-]+(?:\:\d+)?)"
|
(r"(?P<body>[a-z\d]+://(?P<host>[a-z\d._-]+(?:\:\d+)?)"
|
||||||
r"(?:/[/\-.,\w#%&?:;=~!$*+^@]*)?(?:\([/\-_.,a-z\d#%&?;=~]*\))?)"),
|
r"(?:/[/\-.,\w#%&?:;=~!$*+^@']*)?(?:\([/\-_.,a-z\d#%&?;=~]*\))?)"),
|
||||||
|
|
||||||
# mailto: and tel:
|
# mailto: and tel:
|
||||||
r"mailto:(?P<body>[a-z0-9._-]+@(?P<host>[a-z0-9.:-]*[a-z\d]))",
|
r"mailto:(?P<body>[a-z0-9._-]+@(?P<host>[a-z0-9.:-]*[a-z\d]))",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user