X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fclickable.cpp;h=16fc790fc11930deb29f3fa6f54416d77724c335;hp=e875bad1a5d1376b9d0849df15ac1d21c19b9982;hb=d316067d1daf6c7ea790ca9ac5e1ff947fe011ce;hpb=6b43b39928a36f8c7f497a7f9c2de0133e142bd8 diff --git a/src/uisupport/clickable.cpp b/src/uisupport/clickable.cpp index e875bad1..16fc790f 100644 --- a/src/uisupport/clickable.cpp +++ b/src/uisupport/clickable.cpp @@ -51,7 +51,7 @@ 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 authority("(?:(?:[,.;@:]?[-\\w]+)+|\\[[0-9a-f:.]+\\])(?::\\d+)?"); static QString urlChars("(?:[,.;:]*[\\w~@/?&=+$()!%#*{}\\[\\]\\|'^-])"); static QString urlEnd("(?:>|[,.;:\"]*\\s|\\b|$)");