[Commits] [SCM] claws branch, master, updated. 3.15.0-145-gd2578f7

ticho at claws-mail.org ticho at claws-mail.org
Sun Oct 22 12:45:33 CEST 2017


The branch, master has been updated
       via  d2578f7adcf14a288a101e94f048c8215e3a200b (commit)
      from  dc79dfce6803ffc32b5c0a372790c73c774000e9 (commit)

Summary of changes:
 src/plugins/fancy/fancy_viewer.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit d2578f7adcf14a288a101e94f048c8215e3a200b
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sun Oct 22 12:39:01 2017 +0200

    Fancy: Escape the custom stylesheet path for use in URI.
    
    This allows for file/folder names with e.g. space in them.

diff --git a/src/plugins/fancy/fancy_viewer.c b/src/plugins/fancy/fancy_viewer.c
index 990cb9d..5aeff3d 100644
--- a/src/plugins/fancy/fancy_viewer.c
+++ b/src/plugins/fancy/fancy_viewer.c
@@ -147,7 +147,12 @@ static void fancy_set_defaults(FancyViewer *viewer)
 	viewer->override_prefs_scripts = fancy_prefs.enable_scripts;
 	viewer->override_prefs_plugins = fancy_prefs.enable_plugins;
 	viewer->override_prefs_java = fancy_prefs.enable_java;
-	viewer->override_stylesheet = g_strconcat("file://", fancy_prefs.stylesheet, NULL);
+
+	gchar *tmp = g_uri_escape_string(fancy_prefs.stylesheet, "/", TRUE);
+	viewer->override_stylesheet = g_strconcat("file://", tmp, NULL);
+	g_free(tmp);
+	debug_print("Passing '%s' stylesheet URI to Webkit\n",
+			viewer->override_stylesheet);
 
 	g_signal_handlers_block_by_func(G_OBJECT(viewer->enable_images),
 		fancy_auto_load_images_activated, viewer);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list