Ignore links that start with a hyphen or a dot
If you use filter blacklists you'll end up with many invalid links that start with a hyphen or a dot in the final blacklist.
This commit is contained in:
parent
7fb62d98ea
commit
05593a8bbd
|
@ -52,14 +52,14 @@ def parse_list(content, trusted=False):
|
|||
rx_comment = re.compile(r"^(#|$)")
|
||||
rx_inline_comment = re.compile(r"\s*#\s*[a-z0-9-].*$")
|
||||
rx_u = re.compile(
|
||||
r"^@*\|\|([a-z0-9.-]+[.][a-z]{2,})\^?(\$(popup|third-party))?$")
|
||||
rx_l = re.compile(r"^([a-z0-9.-]+[.][a-z]{2,})$")
|
||||
r"^@*\|\|([a-z0-9][a-z0-9.-]*[.][a-z]{2,})\^?(\$(popup|third-party))?$")
|
||||
rx_l = re.compile(r"^([a-z0-9][a-z0-9.-]*[.][a-z]{2,})$")
|
||||
rx_h = re.compile(
|
||||
r"^[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}\s+([a-z0-9.-]+[.][a-z]{2,})$"
|
||||
r"^[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}\s+([a-z0-9][a-z0-9.-]*[.][a-z]{2,})$"
|
||||
)
|
||||
rx_mdl = re.compile(r'^"[^"]+","([a-z0-9.-]+[.][a-z]{2,})",')
|
||||
rx_b = re.compile(r"^([a-z0-9.-]+[.][a-z]{2,}),.+,[0-9: /-]+,")
|
||||
rx_dq = re.compile(r"^address=/([a-z0-9.-]+[.][a-z]{2,})/.")
|
||||
rx_mdl = re.compile(r'^"[^"]+","([a-z0-9][a-z0-9.-]*[.][a-z]{2,})",')
|
||||
rx_b = re.compile(r"^([a-z0-9][a-z0-9.-]*[.][a-z]{2,}),.+,[0-9: /-]+,")
|
||||
rx_dq = re.compile(r"^address=/([a-z0-9][a-z0-9.-]*[.][a-z]{2,})/.")
|
||||
|
||||
if trusted:
|
||||
return parse_trusted_list(content)
|
||||
|
|
Loading…
Reference in New Issue