1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge pull request #3077

Closes #3075.

Andrew Morgan (1):
      Prevent regex capture from extended past line boundaries.
This commit is contained in:
Zetok Zalbavar 2016-04-03 13:24:51 +01:00
commit dde56c99ec
No known key found for this signature in database
GPG Key ID: C953D3880212068A

View File

@ -249,7 +249,7 @@ QString ChatMessage::detectAnchors(const QString &str)
"(?:\\b)((www\\.)|(http[s]?|ftp)://)" // (protocol)://(printable - non-special character)
// http://ONEORMOREALHPA-DIGIT
"\\w+\\S+)" // any other character, lets domains and other
"|(?:\\b)(file:///.*$)" //link to a local file, valid until the end of the line
"|(?:\\b)(file:///)([\\S| ]*)" //link to a local file, valid until the end of the line
"|(?:\\b)(tox:[a-zA-Z\\d]{76}$)" //link with full user address
"|(?:\\b)(mailto:\\S+@\\S+\\.\\S+)" //@mail link
"|(?:\\b)(tox:\\S+@\\S+)"); // starts with `tox` then : and only alpha-digits till the end