From 955d1a5afbabfc2e091ea5d61928f261fb84a615 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Fri, 18 Feb 2011 23:41:55 +0000 Subject: [PATCH] Ignore spaces at the beginning of URLs --- src/common/url.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/url.c b/src/common/url.c index 0671503..2472f06 100644 --- a/src/common/url.c +++ b/src/common/url.c @@ -16,6 +16,7 @@ #include +#include #include @@ -27,6 +28,7 @@ static gchar * _ghtml_make_url(gchar const * base, gchar const * url) if(url == NULL) return NULL; + for(; isspace(*url); url++); /* XXX use a more generic protocol finder (strchr(':')) */ if(strncmp("about:", url, 6) == 0) return g_strdup(url);