talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

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

Fancy: Escape the custom stylesheet path for use in URI.

This allows for file/folder names with e.g. space in them.

Diffstat:
Msrc/plugins/fancy/fancy_viewer.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 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);