diff options
Diffstat (limited to 'embed/ephy-embed-utils.c')
-rw-r--r-- | embed/ephy-embed-utils.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/embed/ephy-embed-utils.c b/embed/ephy-embed-utils.c index d0e369052..2ca6d7689 100644 --- a/embed/ephy-embed-utils.c +++ b/embed/ephy-embed-utils.c @@ -29,6 +29,7 @@ #include "ephy-string.h" #include "ephy-embed-utils.h" +#include "ephy-request-about.h" char* ephy_embed_utils_link_message_parse (char *message) @@ -105,15 +106,25 @@ ephy_embed_utils_address_has_web_scheme (const char *address) char* ephy_embed_utils_normalize_address (const char *address) { - char *effective_address; + char *effective_address = NULL; g_return_val_if_fail (address, NULL); if (ephy_embed_utils_address_has_web_scheme (address) == FALSE) effective_address = g_strconcat ("http://", address, NULL); - else - effective_address = g_strdup (address); - + else { + /* Convert about: schemes to ephy-about: in order to + * force WebKit to delegate its handling to our + * EphyRequestAbout. In general about: schemes are + * handled internally by WebKit and mean "empty + * document". + */ + if (!g_ascii_strcasecmp (address, "about:plugins")) + effective_address = g_strdup (EPHY_ABOUT_SCHEME":plugins"); + else + effective_address = g_strdup (address); + } + return effective_address; } |