]> spindle.queued.net Git - midori/commitdiff
Escape title to be set on error pages
authorChristian Dywan <christian@twotoasts.de>
Thu, 17 Feb 2011 18:38:11 +0000 (19:38 +0100)
committerChristian Dywan <christian@twotoasts.de>
Thu, 17 Feb 2011 18:54:35 +0000 (19:54 +0100)
midori/midori-view.c

index f76bb51e3ce96d74d2b5a276d08894c8b2dac23a..efa013b8c89094e7787711cc6f09c70fcb698d5d 100644 (file)
@@ -1352,6 +1352,7 @@ midori_view_display_error (MidoriView*     view,
         #endif
         gchar* res_root;
         gchar* stock_root;
+        gchar* title_escaped;
         gchar* result;
 
         #if WEBKIT_CHECK_VERSION (1, 1, 14)
@@ -1364,14 +1365,16 @@ midori_view_display_error (MidoriView*     view,
         stock_root = g_strdup_printf ("http://localhost:%d/stock", port);
         #endif
 
+        title_escaped = g_markup_escape_text (title, -1);
         result = sokoke_replace_variables (template,
-            "{title}", title,
+            "{title}", title_escaped,
             "{message}", message,
             "{description}", description,
             "{tryagain}", try_again,
             "{res}", res_root,
             "{stock}", stock_root,
             NULL);
+        g_free (title_escaped);
         g_free (template);
 
         midori_view_load_alternate_string (view,