X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fclickable.cpp;h=16fc790fc11930deb29f3fa6f54416d77724c335;hp=df2d3dc44e8515e4aa689b0fb19fe21c02ccfb12;hb=d452877910888c25d40590b5fff57eb8197ca9b0;hpb=2c64480b5c036a4703fa25a3761d2814d81a6b28 diff --git a/src/uisupport/clickable.cpp b/src/uisupport/clickable.cpp index df2d3dc4..16fc790f 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[] = {