From 518e59303dedfea9b8abac85ab8a4e766a7323ac Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 1 Dec 2021 14:01:41 +0100 Subject: [PATCH] Fix dashes in links. part of CURA-8565 and/or CURA-8585 --- plugins/Marketplace/PackageModel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Marketplace/PackageModel.py b/plugins/Marketplace/PackageModel.py index 859c6c46f0..9b8c873827 100644 --- a/plugins/Marketplace/PackageModel.py +++ b/plugins/Marketplace/PackageModel.py @@ -84,7 +84,7 @@ class PackageModel(QObject): :return: A block of rich text with formatting embedded. """ # Turn all in-line hyperlinks into actual links. - url_regex = re.compile(r"(((http|https)://)[a-zA-Z0-9@:%._+~#?&/=]{2,256}\.[a-z]{2,12}(/[a-zA-Z0-9@:%.-_+~#?&/=]*)?)") + url_regex = re.compile(r"(((http|https)://)[a-zA-Z0-9@:%.\-_+~#?&/=]{2,256}\.[a-z]{2,12}(/[a-zA-Z0-9@:%.\-_+~#?&/=]*)?)") text = re.sub(url_regex, r'\1', text) # Turn newlines into
so that they get displayed as newlines when rendering as rich text.