From c1559056803360cc528c578e3458a0bae33bd56c Mon Sep 17 00:00:00 2001 From: Express50 Date: Sun, 9 Mar 2014 13:42:01 -0400 Subject: [PATCH] Fix URL regex Removes unwise characters from URL regex. These characters should be percent escaped according to RFC 2396. Fixes #1243 --- src/uisupport/clickable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uisupport/clickable.cpp b/src/uisupport/clickable.cpp index 7acd8e22..3b32f267 100644 --- a/src/uisupport/clickable.cpp +++ b/src/uisupport/clickable.cpp @@ -55,7 +55,7 @@ ClickableList ClickableList::fromString(const QString &str) // For matching URLs static QString scheme("(?:(?:mailto:|(?:[+.-]?\\w)+://)|www(?=\\.\\S+\\.))"); static QString authority("(?:(?:[,.;@:]?[-\\w]+)+\\.?|\\[[0-9a-f:.]+\\])(?::\\d+)?"); - static QString urlChars("(?:[,.;:]*[\\w~@/?&=+$()!%#*{}\\[\\]\\|'^-])"); + static QString urlChars("(?:[,.;:]*[\\w~@/?&=+$()!%#*-])"); static QString urlEnd("(?:>|[,.;:\"]*\\s|\\b|$)"); static QRegExp regExp[] = { -- 2.20.1