aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-10-04 09:53:53 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-10-04 09:53:53 +0200
commitc49de691291147233f24c9db17c0c1a3e2b73dde (patch)
treea85e87cb750395e9dab8e245a518001c65a838cb /lib
parent062d534a0024959117e310f8c2a964434acb9fa0 (diff)
downloadlibquotient-c49de691291147233f24c9db17c0c1a3e2b73dde.tar.gz
libquotient-c49de691291147233f24c9db17c0c1a3e2b73dde.zip
Further tighten the linkifier in prettyPrint()
Diffstat (limited to 'lib')
-rw-r--r--lib/util.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util.cpp b/lib/util.cpp
index 8067f561..993152dd 100644
--- a/lib/util.cpp
+++ b/lib/util.cpp
@@ -33,7 +33,7 @@ void Quotient::linkifyUrls(QString& htmlEscapedText)
// comma or dot
static const QRegularExpression FullUrlRegExp(
QStringLiteral(
- R"(\b((www\.(?!\.)(?!(\w|\.|-)+@)|(https?|ftp|magnet|matrix):(//)?)(&(?![lg]t;)|[^&\s<>'"])+(&(?![lg]t;)|[^&!,.\s<>'"\]):])))"),
+ R"(\b((www\.(?!\.)(?!(\w|\.|-)+@)|(https?|ftp):(//)?\w|(magnet|matrix):)(&(?![lg]t;)|[^&\s<>'"])+(&(?![lg]t;)|[^&!,.\s<>'"\]):])))"),
RegExpOptions);
// email address:
// [word chars, dots or dashes]@[word chars, dots or dashes].[word chars]