Allow anchorObject.hash getters do unescape only if dom.url.getters_decode_hash is true

This commit is contained in:
JustOff
2017-03-21 16:21:59 +02:00
committed by roytam1
parent 361d6b8e76
commit f944b442be
7 changed files with 19 additions and 4 deletions
+1 -1
View File
@@ -515,7 +515,7 @@ URL::GetHash(nsString& aHash, ErrorResult& aRv) const
nsresult rv = mURI->GetRef(ref);
if (NS_SUCCEEDED(rv) && !ref.IsEmpty()) {
aHash.Assign(char16_t('#'));
if (nsContentUtils::EncodeDecodeURLHash()) {
if (nsContentUtils::GettersDecodeURLHash()) {
NS_UnescapeURL(ref); // XXX may result in random non-ASCII bytes!
}
AppendUTF8toUTF16(ref, aHash);