epiphany/59950.diff

33 lines
910 B
Diff

Index: epiphany-2.18.0/embed/ephy-embed.c
===================================================================
--- epiphany-2.18.0.orig/embed/ephy-embed.c
+++ epiphany-2.18.0/embed/ephy-embed.c
@@ -27,6 +27,8 @@
#include "mozilla-embed-single.h"
#include "mozilla-embed.h"
+#include <string.h>
+
static void ephy_embed_base_init (gpointer g_class);
GType
@@ -441,8 +443,16 @@ ephy_embed_load_url (EphyEmbed *embed,
const char *url)
{
/* Remove that crap patch please */
- EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed);
- iface->load_url (embed, url);
+ /* Sorry, I don't feel like removing this crap patch. */
+ char *protocol;
+ protocol=malloc(strlen(url)+1);
+ strcpy(protocol,url);
+ protocol=strtok(protocol,":");
+ if(strcasecmp(protocol,"gopher")!=0)
+ {
+ EphyEmbedIface *iface = EPHY_EMBED_GET_IFACE (embed);
+ iface->load_url (embed, url);
+ }
}
/**