[Xfce4-commits] <postler:master> Let about: URIs other than about:blank pass through

Christian Dywan noreply at xfce.org
Sun Jul 18 15:40:13 CEST 2010


Updating branch refs/heads/master
         to ba7c7f6500a77e714e4890fa5e4e7735c7b285a5 (commit)
       from 1a74b862e4d929009784b8fad15265fae4879d39 (commit)

commit ba7c7f6500a77e714e4890fa5e4e7735c7b285a5
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Jul 15 22:04:09 2010 +0200

    Let about: URIs other than about:blank pass through

 postler/postler-content.vala |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index 0f3309d..cc8e523 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -751,12 +751,16 @@ public class Postler.Content : WebKit.WebView {
     bool navigation_decision (WebKit.WebFrame web_frame,
         WebKit.NetworkRequest request, WebKit.WebNavigationAction action,
         WebKit.WebPolicyDecision decision) {
-        string uri = request.get_uri ();
+        string? uri = request.get_uri ();
 
         if (uri == null || uri == "about:blank") {
             decision.use ();
             return true;
         }
+
+        if (uri != null && uri.has_prefix ("about:"))
+            return false;
+
         decision.ignore ();
         return Postler.App.show_uri (get_screen (), uri);
     }



More information about the Xfce4-commits mailing list