Philipp Hörist pushed to branch master at gajim / gajim
Commits:
c360bbc2 by Philipp Hörist at 2026-02-24T22:45:30+01:00
cfix: Previews: Use better url regex
- - - - -
1 changed file:
- gajim/gtk/message_url_previews.py
Changes:
=====================================
gajim/gtk/message_url_previews.py
=====================================
@@ -20,7 +20,7 @@
from gajim.common.multiprocess.http import CancelledError
from gajim.common.multiprocess.url_preview import generate_url_preview
from gajim.common.open_graph_parser import OpenGraphData
-from gajim.common.regex import URL_REGEX
+from gajim.common.regex import IRI_RX
from gajim.common.types import ChatContactT
from gajim.gtk.preview.open_graph import OpenGraphPreviewWidget
@@ -111,7 +111,7 @@ def _find_urls(self, text: str) -> None:
self._preview_timeout_id = None
# We use lists here to preserve a stable and consistent order
- matches = itertools.islice(re.finditer(URL_REGEX, text),
MAX_URL_PREVIEWS)
+ matches = itertools.islice(re.finditer(IRI_RX, text), MAX_URL_PREVIEWS)
urls = [match.group() for match in matches]
# Remove dismissed urls if they are not present in the text anymore
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/c360bbc201ffd7220c2510aa6148debbc74923e1
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/c360bbc201ffd7220c2510aa6148debbc74923e1
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]