Bug 1369317 - Do not escape the returned string in nsSimpleURI::GetAsciiSpec r=mcmanus

The spec is already escaped in SetSpec,SetQuery,SetRef - so there is no need to escape it again in the getter.

MozReview-Commit-ID: C0279q5nLXl

--HG--
extra : rebase_source : 726bda4f13bdab7c3e22eed29f6a8cd9bccb024f
This commit is contained in:
Valentin Gosu 2017-08-13 10:03:10 +02:00
parent 4bb6f3341d
commit 8d15eba8a4

View File

@ -695,12 +695,12 @@ nsSimpleURI::Resolve(const nsACString &relativePath, nsACString &result)
}
NS_IMETHODIMP
nsSimpleURI::GetAsciiSpec(nsACString &result)
nsSimpleURI::GetAsciiSpec(nsACString &aResult)
{
nsAutoCString buf;
nsresult rv = GetSpec(buf);
nsresult rv = GetSpec(aResult);
if (NS_FAILED(rv)) return rv;
return NS_EscapeURL(buf, esc_OnlyNonASCII|esc_AlwaysCopy, result, fallible);
MOZ_ASSERT(IsASCII(aResult), "The spec should be ASCII");
return NS_OK;
}
NS_IMETHODIMP