summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b619ad7)
We still allow some of the characters flagged "unwise" in RFC 2396
Fixes #860
Fixes #876
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 urlChars("(?:[,.;:\\w~@/?&=+$()!%#*{}\\[\\]'^-])");
+ static QString authority("(?:[,.;@:]?[-\\w]+)+(?::\\d+)?");
+ static QString urlChars("(?:[,.;:]*[\\w~@/?&=+$()!%#*{}\\[\\]\\|'^-])");
static QString urlEnd("(?:>|[,.;:\"]*\\s|\\b|$)");
static QRegExp regExp[] = {
static QString urlEnd("(?:>|[,.;:\"]*\\s|\\b|$)");
static QRegExp regExp[] = {