[Xfce4-commits] <midori:master> Don't unescape line breaks in URLs
Christian Dywan
noreply at xfce.org
Mon Sep 24 20:40:01 CEST 2012
Updating branch refs/heads/master
to 1c447c15abc975b854c2763c974a0d2eb5d7f58b (commit)
from 243d09ae0e317fe8224ca23ba8a703858f9cf6e6 (commit)
commit 1c447c15abc975b854c2763c974a0d2eb5d7f58b
Author: Christian Dywan <christian at twotoasts.de>
Date: Mon Sep 24 20:36:38 2012 +0200
Don't unescape line breaks in URLs
Fixes: https://bugs.launchpad.net/midori/+bug/969067
katze/midori-uri.vala | 2 +-
tests/magic-uri.c | 2 ++
tests/tab.vala | 5 ++++-
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/katze/midori-uri.vala b/katze/midori-uri.vala
index 05ebcea..c47a6a0 100644
--- a/katze/midori-uri.vala
+++ b/katze/midori-uri.vala
@@ -57,7 +57,7 @@ namespace Midori {
string? unescaped = GLib.Uri.unescape_string (uri, "+");
if (unescaped == null)
return uri;
- return unescaped.replace (" ", "%20");
+ return unescaped.replace (" ", "%20").replace ("\n", "%0A");
}
return uri;
}
diff --git a/tests/magic-uri.c b/tests/magic-uri.c
index be9a199..714a078 100644
--- a/tests/magic-uri.c
+++ b/tests/magic-uri.c
@@ -285,6 +285,8 @@ magic_uri_format (void)
{ "http://wiki.c3sl.ufpr.br/multiseat/index.php/Xephyr_Solution", NULL },
{ "http://şøñđëřżēıċħęŋđőmæîņĭśŧşũþėŗ.de/char.jpg", NULL },
{ "http://www.ⓖⓝⓞⓜⓔ.org/", "http://www.gnome.org/" },
+ { "http://translate.google.com/#en/de/cat%0Adog%0Ahorse",
+ "http://translate.google.com/#en/de/cat%0Adog%0Ahorse" },
};
guint i;
diff --git a/tests/tab.vala b/tests/tab.vala
index 03cbc4a..d6f4069 100644
--- a/tests/tab.vala
+++ b/tests/tab.vala
@@ -45,7 +45,10 @@ const TestCaseEllipsize[] titles = {
Pango.EllipsizeMode.START, "file:///home/user" },
{ "http://paste.foo/0007-Bump-version-to-0.4.7.patch",
null,
- Pango.EllipsizeMode.START, "0007-Bump-version-to-0.4.7.patch" }
+ Pango.EllipsizeMode.START, "0007-Bump-version-to-0.4.7.patch" },
+ { "http://translate.google.com/#en/de/cat%0Adog%0Ahorse",
+ "Google Translator",
+ Pango.EllipsizeMode.END, null }
};
static void tab_display_title () {
More information about the Xfce4-commits
mailing list