mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 14:58:37 +09:00
[dom] Update noscript serialization to the changed spec.
Make <noscript> escaping conditional on whether scripting is enabled.
This commit is contained in:
parent
79d90233cd
commit
d86d1256bc
1 changed files with 4 additions and 4 deletions
|
|
@ -9140,10 +9140,6 @@ ShouldEscape(nsIContent* aParent)
|
|||
nsGkAtoms::style, nsGkAtoms::script, nsGkAtoms::xmp,
|
||||
nsGkAtoms::iframe, nsGkAtoms::noembed, nsGkAtoms::noframes,
|
||||
nsGkAtoms::plaintext,
|
||||
// Per the current spec noscript should be escaped in case
|
||||
// scripts are disabled or if document doesn't have
|
||||
// browsing context. However the latter seems to be a spec bug
|
||||
// and Gecko hasn't traditionally done the former.
|
||||
nsGkAtoms::noscript
|
||||
};
|
||||
static mozilla::BloomFilter<12, nsIAtom> sFilter;
|
||||
|
|
@ -9159,6 +9155,10 @@ ShouldEscape(nsIContent* aParent)
|
|||
if (sFilter.mightContain(tag)) {
|
||||
for (uint32_t i = 0; i < ArrayLength(nonEscapingElements); ++i) {
|
||||
if (tag == nonEscapingElements[i]) {
|
||||
if (MOZ_UNLIKELY(tag == nsGkAtoms::noscript) &&
|
||||
MOZ_UNLIKELY(!aParent->OwnerDoc()->IsScriptEnabled())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue