[SCM] kcoreaddons packaging branch, master, updated. debian/5.28.0-1-6-gba9f151
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Mar 31 14:22:43 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/frameworks/kcoreaddons.git;a=commitdiff;h=e50754e
The following commit has been merged in the master branch:
commit e50754e912d2d28052454cf5af26e80e4473678b
Author: Maximiliano Curia <maxy at gnuservers.com.ar>
Date: Fri Mar 31 15:51:29 2017 +0200
Add new upstream patch: Fix-Bug-343275-1-added-at-the-end-of-a-hyperlink.patch
---
...-343275-1-added-at-the-end-of-a-hyperlink.patch | 57 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 58 insertions(+)
diff --git a/debian/patches/Fix-Bug-343275-1-added-at-the-end-of-a-hyperlink.patch b/debian/patches/Fix-Bug-343275-1-added-at-the-end-of-a-hyperlink.patch
new file mode 100644
index 0000000..bb47d86
--- /dev/null
+++ b/debian/patches/Fix-Bug-343275-1-added-at-the-end-of-a-hyperlink.patch
@@ -0,0 +1,57 @@
+From: Montel Laurent <montel at kde.org>
+Date: Wed, 23 Nov 2016 08:07:25 +0100
+Subject: Fix Bug 343275 - [1] added at the end of a hyperlink
+
+FIXED-IN: 5.29
+BUG: 343275
+---
+ autotests/ktexttohtmltest.cpp | 5 +++++
+ src/lib/text/ktexttohtml.cpp | 6 ++++++
+ 2 files changed, 11 insertions(+)
+
+diff --git a/autotests/ktexttohtmltest.cpp b/autotests/ktexttohtmltest.cpp
+index ccac29a..f48a31c 100644
+--- a/autotests/ktexttohtmltest.cpp
++++ b/autotests/ktexttohtmltest.cpp
+@@ -411,6 +411,11 @@ void KTextToHTMLTest::testHtmlConvert_data()
+ QTest::newRow("url-exec-html-6") << "https://<IP>:/\"><script>alert(1);</script><!--
Test2"
+ << KTextToHTML::Options(KTextToHTML::PreserveSpaces)
+ << "https://<IP>:/"><script>alert(1);</script><!--
Test2";
++
++
++ QTest::newRow("url-with-ref-in-[") << "https://www.kde.org[1]"
++ << KTextToHTML::Options(KTextToHTML::PreserveSpaces)
++ << "<a href=\"https://www.kde.org\">https://www.kde.org</a>[1]";
+ }
+
+
+diff --git a/src/lib/text/ktexttohtml.cpp b/src/lib/text/ktexttohtml.cpp
+index 30e0b5d..ecc1d22 100644
+--- a/src/lib/text/ktexttohtml.cpp
++++ b/src/lib/text/ktexttohtml.cpp
+@@ -229,12 +229,15 @@ QString KTextToHTMLHelper::getUrl(bool *badurl)
+ int start = mPos;
+ bool previousCharIsSpace = false;
+ bool previousCharIsADoubleQuote = false;
++ bool previousIsAnAnchor = false;
+ while ((mPos < mText.length()) &&
+ (mText[mPos].isPrint() || mText[mPos].isSpace()) &&
+ ((afterUrl.isNull() && !mText[mPos].isSpace()) ||
+ (!afterUrl.isNull() && mText[mPos] != afterUrl))) {
+ if (mText[mPos].isSpace()) {
+ previousCharIsSpace = true;
++ } else if (!previousIsAnAnchor && mText[mPos] == QLatin1Char('[')) {
++ break;
+ } else { // skip whitespace
+ if (previousCharIsSpace && mText[mPos] == QLatin1Char('<')) {
+ url.append(QLatin1Char(' '));
+@@ -253,6 +256,9 @@ QString KTextToHTMLHelper::getUrl(bool *badurl)
+ } else {
+ previousCharIsADoubleQuote = false;
+ }
++ if (mText[mPos] == QLatin1Char('#')) {
++ previousIsAnAnchor = true;
++ }
+ url.append(mText[mPos]);
+ if (url.length() > mMaxUrlLen) {
+ break;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..aa2bbd3
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+Fix-Bug-343275-1-added-at-the-end-of-a-hyperlink.patch
--
kcoreaddons packaging
More information about the pkg-kde-commits
mailing list