From bc489304588d450867da415317b3f084f38d253c Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Fri, 23 May 2008 21:12:37 +0000 Subject: Remove leading/trailing whitespace from strings in EventContext. Bug #533983. svn path=/branches/gnome-2-22/; revision=8246 --- embed/mozilla/EventContext.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'embed/mozilla') diff --git a/embed/mozilla/EventContext.cpp b/embed/mozilla/EventContext.cpp index 6e22fce8a..0cc04fe6b 100644 --- a/embed/mozilla/EventContext.cpp +++ b/embed/mozilla/EventContext.cpp @@ -968,9 +968,10 @@ nsresult EventContext::SetStringProperty (const char *name, const char *value) GValue *val = g_new0 (GValue, 1); g_value_init (val, G_TYPE_STRING); - - g_value_set_string (val, value); - + + char *copy = g_strstrip (g_strdup (value)); + g_value_take_string (val, copy); + mozilla_embed_event_set_property (mEmbedEvent, name, val); return NS_OK; -- cgit v1.2.3