[balsa] html: Fix HTML rendering with webkit2gtk-4.0 < 2.20
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] html: Fix HTML rendering with webkit2gtk-4.0 < 2.20
- Date: Sat, 7 Jul 2018 20:38:38 +0000 (UTC)
commit 3423ca9bf48e675007b7fb1bd61b50aa97d14890
Author: Albrecht Dreß <albrecht dress arcor de>
Date: Sat Jul 7 16:36:49 2018 -0400
html: Fix HTML rendering with webkit2gtk-4.0 < 2.20
* README: document use of G_MESSAGES_DEBUG=…
* libbalsa/html.c (lbh_navigation_policy_decision):
allow the rendering of “about:blankâ€.
Signed-off-by: Peter Bloomfield <PeterBloomfield bellsouth net>
ChangeLog | 8 ++++++++
README | 14 ++++++++++++++
libbalsa/html.c | 12 ++++++++----
3 files changed, 30 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8e0474a52..c746fed06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-07-07 Albrecht Dreß <albrecht dress arcor de>
+
+ Fix HTML rendering with webkit2gtk-4.0 < 2.20
+
+ * README: document use of G_MESSAGES_DEBUG=…
+ * libbalsa/html.c (lbh_navigation_policy_decision):
+ allow the rendering of “about:blankâ€.
+
2018-07-07 Peter Bloomfield <pbloomfield bellsouth net>
Use g_debug() instead of conditionally compiled printing
diff --git a/README b/README
index 0db1bc8ea..701edd88e 100644
--- a/README
+++ b/README
@@ -235,6 +235,20 @@ directory. It should contain the following:
filename=/path/to/your/browser
+Debugging:
+---------
+Set the environment variable G_MESSAGES_DEBUG to print debugging
+information to the console. The value shall be either a space-
+separated list of log domains, or the special value "all". The
+following custom domains are implemented in Balsa:
+- libnetclient: low-level network IO. Warning: the output may contain
+ plain-text passwords.
+- imap: IMAP server interaction. Warning: the output may contain
+ plain-text passwords.
+- crypto: GnuPG and S/MIME crypto operations
+- html: HTML rendering with webkit2
+
+
Reporting Bugs:
--------------
See http://balsa.gnome.org/bugs.html for instructions.
diff --git a/libbalsa/html.c b/libbalsa/html.c
index 1e5e2f500..307194e0a 100644
--- a/libbalsa/html.c
+++ b/libbalsa/html.c
@@ -44,13 +44,13 @@
#include <string.h>
#include <glib/gi18n.h>
+#ifdef HAVE_HTML_WIDGET
+
#ifdef G_LOG_DOMAIN
# undef G_LOG_DOMAIN
#endif
#define G_LOG_DOMAIN "html"
-#ifdef HAVE_HTML_WIDGET
-
/*
* Used by all HTML widgets
*
@@ -281,8 +281,12 @@ lbh_navigation_policy_decision(WebKitPolicyDecision * decision,
g_debug("%s clicked %s", __func__, uri);
(*info->clicked_cb) (uri);
default:
- g_debug("%s uri %s, type %d, ignored", __func__, uri, navigation_type);
- webkit_policy_decision_ignore(decision);
+ if (g_ascii_strcasecmp(uri, "about:blank") != 0) {
+ g_debug("%s uri %s, type %d, ignored", __func__, uri, navigation_type);
+ webkit_policy_decision_ignore(decision);
+ } else {
+ g_debug("%s uri %s, type %d loaded", __func__, uri, navigation_type);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]