[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:05:29 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=a16e840

The following commit has been merged in the master branch:
commit a16e840b0f71ed5ddc6e80b0a24ea551f4fe4a83
Author: Сковорода Никита Андреевич <chalkerx at gmail.com>
Date:   Sun Sep 2 02:26:58 2012 +0400

    Fix URL escaping to the HTML view
    
    Insert URLs with double quotes rather than single quotes. These are escaped by the javascript
    handling in adium-theme-view.
    
    Reviewed-by: David Edmundson
---
 KTp/message-url-filter.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/KTp/message-url-filter.cpp b/KTp/message-url-filter.cpp
index a4ea8e0..162f992 100644
--- a/KTp/message-url-filter.cpp
+++ b/KTp/message-url-filter.cpp
@@ -42,11 +42,12 @@ void UrlFilter::filterMessage(Message &info) {
 
     int offset = 0;
     for (int i = 0; i < parsedUrl.fixedUrls.size(); i++) {
+         KUrl url(parsedUrl.fixedUrls.at(i));
          QString originalText = message.mid(parsedUrl.urlRanges.at(i).first + offset, parsedUrl.urlRanges.at(i).second);
-         QString link = QString::fromLatin1("<a href='%1'>%2</a>").arg(parsedUrl.fixedUrls.at(i), originalText);
+         QString link = QString::fromLatin1("<a href=\"%1\">%2</a>").arg(QString::fromAscii(url.toEncoded()), originalText);
          message.replace(parsedUrl.urlRanges.at(i).first + offset, parsedUrl.urlRanges.at(i).second, link);
 
-         urls.append(KUrl(parsedUrl.fixedUrls.at(i)));
+         urls.append(url);
 
          //after the first replacement is made, the original position values are not valid anymore, this adjusts them
          offset += link.length() - originalText.length();

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list