From bb48852d876a230197e5f61f3057a5264fc0841c Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Sun, 16 Nov 2014 13:50:45 +0100 Subject: [PATCH] Fix tox: url highlighting breaking the :tox: smiley Fixes #772 --- src/widget/tool/chatactions/messageaction.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/widget/tool/chatactions/messageaction.cpp b/src/widget/tool/chatactions/messageaction.cpp index 42e46bc79..06f27ef1d 100644 --- a/src/widget/tool/chatactions/messageaction.cpp +++ b/src/widget/tool/chatactions/messageaction.cpp @@ -41,6 +41,13 @@ QString MessageAction::getMessage(QString div) { QString url = exp.cap(); + // If there's a trailing " it's a HTML attribute, e.g. a smiley img's title=":tox:" + if (url == "tox:\"") + { + offset += url.length(); + continue; + } + // add scheme if not specified if (exp.cap(1) == "www.") url.prepend("http://");