projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adjust URL RegEx to allow for domain names ending with a dot.
[quassel.git]
/
src
/
uisupport
/
clickable.cpp
diff --git
a/src/uisupport/clickable.cpp
b/src/uisupport/clickable.cpp
index
e875bad
..
0674d0e
100644
(file)
--- 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+\\.))");
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|$)");
static QString urlChars("(?:[,.;:]*[\\w~@/?&=+$()!%#*{}\\[\\]\\|'^-])");
static QString urlEnd("(?:>|[,.;:\"]*\\s|\\b|$)");