gtkbookmarksmanager: don't allow non valid utf8 in bookmarks

In case some client send to us a non valid utf8 string, don't screw up
the bookmarks file and just return.
parent ecc698a2
......@@ -145,7 +145,7 @@ save_bookmarks (GFile *bookmarks_file,
g_string_append (contents, uri);
if (bookmark->label)
if (bookmark->label && g_utf8_validate (bookmark->label, -1, NULL))
g_string_append_printf (contents, " %s", bookmark->label);
g_string_append_c (contents, '\n');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment