summaryrefslogtreecommitdiffstats
path: root/parser/html/nsHtml5TreeOperation.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 15:18:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 15:18:54 +0000
commita5f28e22cc28ca53d092f6545bc924ee43a8bbe4 (patch)
tree7e02d01734d97de08bdeed66d2d5185f8e4f0a61 /parser/html/nsHtml5TreeOperation.cpp
parentReleasing progress-linux version 115.8.0esr-1~deb12u1progress7u1. (diff)
downloadfirefox-esr-a5f28e22cc28ca53d092f6545bc924ee43a8bbe4.tar.xz
firefox-esr-a5f28e22cc28ca53d092f6545bc924ee43a8bbe4.zip
Merging upstream version 115.9.0esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'parser/html/nsHtml5TreeOperation.cpp')
-rw-r--r--parser/html/nsHtml5TreeOperation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/parser/html/nsHtml5TreeOperation.cpp b/parser/html/nsHtml5TreeOperation.cpp
index a6e0298420..eb1c6657cf 100644
--- a/parser/html/nsHtml5TreeOperation.cpp
+++ b/parser/html/nsHtml5TreeOperation.cpp
@@ -393,7 +393,8 @@ nsresult nsHtml5TreeOperation::AddAttributes(nsIContent* aNode,
--i;
nsAtom* localName = aAttributes->getLocalNameNoBoundsCheck(i);
int32_t nsuri = aAttributes->getURINoBoundsCheck(i);
- if (!node->HasAttr(nsuri, localName)) {
+ if (!node->HasAttr(nsuri, localName) &&
+ !(nsuri == kNameSpaceID_None && localName == nsGkAtoms::nonce)) {
nsString value; // Not Auto, because using it to hold nsStringBuffer*
aAttributes->getValueNoBoundsCheck(i).ToString(value);
node->SetAttr(nsuri, localName, aAttributes->getPrefixNoBoundsCheck(i),