[Xfce4-commits] <midori:master> Strip LRE to prevent it from begin saved to disk
Christian Dywan
noreply at xfce.org
Tue Mar 5 01:50:01 CET 2013
Updating branch refs/heads/master
to 12cc7d81707c663900d10a1591f5247ebc7e23fb (commit)
from e7e32b1cf62667d4bb6c8fd83734167259cfde82 (commit)
commit 12cc7d81707c663900d10a1591f5247ebc7e23fb
Author: Christian Dywan <christian at twotoasts.de>
Date: Tue Mar 5 01:35:01 2013 +0100
Strip LRE to prevent it from begin saved to disk
Fixes: https://bugs.launchpad.net/midori/+bug/706836
midori/midori-array.c | 7 ++++++-
midori/midori-browser.c | 3 ++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/midori/midori-array.c b/midori/midori-array.c
index 38fefdf..87e826c 100644
--- a/midori/midori-array.c
+++ b/midori/midori-array.c
@@ -729,7 +729,12 @@ string_append_item (GString* string,
g_string_append (string, "<bookmark href=\"");
string_append_escaped (string, katze_item_get_uri (item));
g_string_append (string, "\">\n");
- string_append_xml_element (string, "title", katze_item_get_name (item));
+ /* Strip LRE leading character */
+ if (g_str_has_prefix (item->name, ""))
+ string_append_xml_element (string, "title",
+ g_utf8_next_char (strstr (item->name, "")));
+ else
+ string_append_xml_element (string, "title", item->name);
string_append_xml_element (string, "desc", katze_item_get_text (item));
g_string_append (string, metadata);
g_string_append (string, "</bookmark>\n");
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index d5d4e43..bdd24a2 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -2417,7 +2417,8 @@ _action_add_desktop_shortcut_activate (GtkAction* action,
const gchar* app_name = katze_item_get_name (item);
gchar* app_exec = g_strconcat ("midori -a ", katze_item_get_uri (item), NULL);
GKeyFile* keyfile = g_key_file_new ();
- gchar* filename = g_strdelimit (g_strconcat (app_name, ".desktop", NULL), "/", '_');
+ /* Strip LRE leading character and / */
+ gchar* filename = g_strdelimit (g_strconcat (app_name, ".desktop", NULL), "/", ' ');
gchar* app_dir = g_build_filename (g_get_user_data_dir (), "applications", filename, NULL);
#if WEBKIT_CHECK_VERSION (1, 3, 13)
/* FIXME: midori_paths_get_icon */
More information about the Xfce4-commits
mailing list