[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:19:39 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=d59d56a

The following commit has been merged in the master branch:
commit d59d56ab545192fef0c0961fdc8d0760f86b99a0
Author: Geert Lamers <biert85 at gmail.com>
Date:   Tue Aug 2 00:44:17 2011 +0100

    Fix a bug in which emoticons can appear in URLs in messages, by swapping the order of processing
    
    BUG: 278790
    
    Reviewed by: David Edmundson
---
 lib/adium-theme-view.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/adium-theme-view.cpp b/lib/adium-theme-view.cpp
index 0eb1090..74e5a96 100644
--- a/lib/adium-theme-view.cpp
+++ b/lib/adium-theme-view.cpp
@@ -390,13 +390,13 @@ QString AdiumThemeView::replaceStatusKeywords(QString &htmlTemplate, const Adium
 QString AdiumThemeView::replaceMessageKeywords(QString &htmlTemplate, const AdiumThemeMessageInfo& info)
 {
     //message
-    htmlTemplate.replace("%message%", m_emoticons.theme().parseEmoticons(info.message()));
+    QString message = info.message();
 
     // link detection
     QRegExp linkRegExp("\b(?:(\w+)://|(www\.))([^\s]+)");
     int index = 0;
 
-    while ((index = linkRegExp.indexIn(htmlTemplate, index)) != -1) {
+    while ((index = linkRegExp.indexIn(message, index)) != -1) {
         QString realUrl = linkRegExp.cap(0);
         QString protocol = linkRegExp.cap(1);
 
@@ -430,7 +430,7 @@ QString AdiumThemeView::replaceMessageKeywords(QString &htmlTemplate, const Adiu
 
                 // if the url is changed, show in chat what the user typed in
                 QString link = "<a href='" + realUrl + "'>" + shownUrl + "</a>";
-                htmlTemplate.replace(index, shownUrl.length(), link);
+                message.replace(index, shownUrl.length(), link);
                 // advance position otherwise I end up parsing the same link
                 index += link.length();
             } else {
@@ -441,6 +441,9 @@ QString AdiumThemeView::replaceMessageKeywords(QString &htmlTemplate, const Adiu
         }
     }
 
+    message = m_emoticons.theme().parseEmoticons(message);
+    htmlTemplate.replace("%message%", message);
+
     //service
     htmlTemplate.replace("%service%", info.service());
     //time

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list