mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-12 23:12:21 +00:00
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:
parent
4bb6f3341d
commit
8d15eba8a4
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user