X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fclickable.cpp;h=e875bad1a5d1376b9d0849df15ac1d21c19b9982;hp=df2d3dc44e8515e4aa689b0fb19fe21c02ccfb12;hb=6b43b39928a36f8c7f497a7f9c2de0133e142bd8;hpb=b619ad78665f63b798389d0f7a33a22da7d93718 diff --git a/src/uisupport/clickable.cpp b/src/uisupport/clickable.cpp index df2d3dc4..e875bad1 100644 --- a/src/uisupport/clickable.cpp +++ b/src/uisupport/clickable.cpp @@ -51,8 +51,8 @@ void Clickable::activate(NetworkId networkId, const QString &text) const { ClickableList ClickableList::fromString(const QString &str) { // For matching URLs static QString scheme("(?:(?:mailto:|(?:[+.-]?\\w)+://)|www(?=\\.\\S+\\.))"); - static QString authority("(?:[,.;@:-]?\\w+)+(?::\\d+)?"); - static QString urlChars("(?:[,.;:\\w~@/?&=+$()!%#*{}\\[\\]'^-])"); + static QString authority("(?:[,.;@:]?[-\\w]+)+(?::\\d+)?"); + static QString urlChars("(?:[,.;:]*[\\w~@/?&=+$()!%#*{}\\[\\]\\|'^-])"); static QString urlEnd("(?:>|[,.;:\"]*\\s|\\b|$)"); static QRegExp regExp[] = {