X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fclickable.cpp;h=0674d0e78b0e045eaa3335cdc8d5dd12411e560d;hp=54efc989c0f7f691f24f9f3b0f7c421464ec6c37;hb=3ff1ec5b699a38e4a03deec4ea9576fade54cbbe;hpb=d7640a623ac18b88f09eb26a50840a10b0459c2d diff --git a/src/uisupport/clickable.cpp b/src/uisupport/clickable.cpp index 54efc989..0674d0e7 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]+)+\\.?|\\[[0-9a-f:.]+\\])(?::\\d+)?"); + static QString urlChars("(?:[,.;:]*[\\w~@/?&=+$()!%#*{}\\[\\]\\|'^-])"); static QString urlEnd("(?:>|[,.;:\"]*\\s|\\b|$)"); static QRegExp regExp[] = {