From e074659671a4545808f509de37597fc9161bb993 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Wed, 2 Feb 2005 19:48:10 +0000 Subject: Don't copy params with the email address. Fixes bug #144469. 2005-02-02 Christian Persch * embed/mozilla/EventContext.cpp: Don't copy params with the email address. Fixes bug #144469. --- embed/mozilla/EventContext.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'embed/mozilla') diff --git a/embed/mozilla/EventContext.cpp b/embed/mozilla/EventContext.cpp index 2001cfc0f..1472ee4d7 100644 --- a/embed/mozilla/EventContext.cpp +++ b/embed/mozilla/EventContext.cpp @@ -403,15 +403,18 @@ nsresult EventContext::GetEventContext (nsIDOMEventTarget *EventTarget, { /* cut "mailto:" */ href.Cut (0, 7); - // FIXME: cut any chars after "?" + + char *str = g_strdup (href.get()); + g_strdelimit (str, "?", '\0'); nsEmbedCString unescapedHref; - rv = Unescape (href, unescapedHref); + rv = Unescape (nsEmbedCString(str), unescapedHref); if (NS_SUCCEEDED (rv) && unescapedHref.Length()) { SetStringProperty ("email", unescapedHref.get()); info->context |= EPHY_EMBED_CONTEXT_EMAIL_LINK; } + g_free (str); } if (anchor && tmp.Length()) -- cgit v1.2.3