gedit r6149 - in trunk: . plugins/filebrowser



Author: pborelli
Date: Sat Feb  9 21:07:46 2008
New Revision: 6149
URL: http://svn.gnome.org/viewvc/gedit?rev=6149&view=rev

Log:
2008-02-09  Paolo Borelli  <pborelli katamail com>

	* plugins/filebrowser/gedit-file-bookmarks-store.c: do not escape uri
	when adding it to the store. Spotted by Mikael Hermansson, bug #514636.



Modified:
   trunk/ChangeLog
   trunk/plugins/filebrowser/gedit-file-bookmarks-store.c

Modified: trunk/plugins/filebrowser/gedit-file-bookmarks-store.c
==============================================================================
--- trunk/plugins/filebrowser/gedit-file-bookmarks-store.c	(original)
+++ trunk/plugins/filebrowser/gedit-file-bookmarks-store.c	Sat Feb  9 21:07:46 2008
@@ -396,7 +396,6 @@
 			if (**line) {
 				gchar *pos;
 				gchar *name;
-				gchar *unescape;
 
 				/* Check, is this really utf8? */
 				pos = g_utf8_strchr (*line, -1, ' ');
@@ -408,12 +407,15 @@
 					name = NULL;
 				}
 
-				unescape = gnome_vfs_unescape_string (*line, "");
-
-				added = add_uri (model, unescape, name,
-						 GEDIT_FILE_BOOKMARKS_STORE_IS_BOOKMARK,
-						 NULL);
-				g_free (unescape);
+				/* the bookmarks file should contain valid
+				 * URIs, but paranoia is good */
+				if (gedit_utils_is_valid_uri (*line)) {
+					added = add_uri (model,
+							 *line,
+							 name,
+							 GEDIT_FILE_BOOKMARKS_STORE_IS_BOOKMARK,
+							 NULL);
+				}
 			}
 		}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]