Improve image path matching regex for html_filter
This commit is contained in:
parent
06d75a18fc
commit
498bee2e20
|
@ -191,7 +191,9 @@ class HtmlFilter:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _is_image_path(link: str) -> bool:
|
def _is_image_path(link: str) -> bool:
|
||||||
return bool(re.match(
|
return bool(re.match(
|
||||||
r".+\.(jpg|jpeg|png|gif|bmp|webp|tiff|svg)$", link, re.IGNORECASE,
|
r"(https?|s?ftp)://.+/.+\.(jpg|jpeg|png|gif|bmp|webp|tiff|svg)$",
|
||||||
|
link,
|
||||||
|
re.IGNORECASE,
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user