--- embed/mozilla/EphyAboutModule.cpp 2007-11-12 12:44:38.000000000 +0100 +++ xulrunner/components/EphyAboutModule.cpp 2007-11-17 22:12:13.000000000 +0100 @@ -1,8 +1,8 @@ /* * Copyright © 2001 Matt Aubury, Philip Langdale * Copyright © 2004 Crispin Flowerday - * Copyright © 2005 Christian Persch * Copyright © 2005 Adam Hooper + * Copyright © 2005, 2007 Christian Persch * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,7 +21,7 @@ * $Id$ */ -#include "mozilla-config.h" +#include #include "config.h" #include @@ -29,17 +29,15 @@ #include #include -// we need nsEscape which depends on internal strings :((( -#define MOZILLA_INTERNAL_API 1 -#include +#include #include #include -#include #include #include #include #include +#include #include #include #include @@ -94,7 +92,6 @@ return NS_ERROR_ILLEGAL_VALUE; } -#ifdef HAVE_GECKO_1_9 /* unsigned long getURIFlags(in nsIURI aURI); */ NS_IMETHODIMP EphyAboutModule::GetURIFlags (nsIURI *aURI, @@ -103,7 +100,6 @@ *_result = 0; return NS_OK; } -#endif /* private functions */ @@ -158,7 +154,10 @@ char **params = g_strsplit (query, "&", -1); if (!params) return NS_ERROR_FAILURE; - for (PRUint32 i = 0; params[i] != NULL; ++i) + nsCOMPtr netUtil (do_GetService (NS_NETUTIL_CONTRACTID)); + if (!netUtil) return NS_ERROR_FAILURE; + + for (PRUint32 i = 0; params[i] != NULL; ++i) { char *param = params[i]; @@ -167,18 +166,18 @@ switch (param[0]) { case 'e': - aCode.Assign (nsUnescape (param + 2)); + netUtil->UnescapeString (nsDependentCString (param + 2), 0, aCode); break; case 'u': aRawOriginURL.Assign (param + 2); - aOriginURL.Assign (nsUnescape (param + 2)); + netUtil->UnescapeString (nsDependentCString (param + 2), 0, aOriginURL); break; case 'c': - aOriginCharset.Assign (nsUnescape (param + 2)); + netUtil->UnescapeString (nsDependentCString (param + 2), 0, aOriginCharset); break; /* The next one is not used in neterror but recover: */ case 't': - aTitle.Assign (nsUnescape (param + 2)); + netUtil->UnescapeString (nsDependentCString (param + 2), 0, aTitle); break; case 'd': /* we don't need mozilla's description parameter */