summaryrefslogtreecommitdiff
path: root/parser
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-09-23 01:02:29 +0000
committerMoonchild <moonchild@palemoon.org>2020-09-23 01:02:29 +0000
commitf86c7c1f2fbc2d6a5a3005b789304816e4cfe23e (patch)
tree37238b70f89e8e961f6f823dbeed627a4dcf2d6b /parser
parentd7e03882066b953870696a2d95b60d92e0c89366 (diff)
downloaduxp-f86c7c1f2fbc2d6a5a3005b789304816e4cfe23e.tar.gz
[SVG] Only fire the SVG onload when scripting is enabled and allowed
Diffstat (limited to 'parser')
-rw-r--r--parser/html/nsHtml5TreeBuilderCppSupplement.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/parser/html/nsHtml5TreeBuilderCppSupplement.h b/parser/html/nsHtml5TreeBuilderCppSupplement.h
index aa6767e427..96b69e4b1a 100644
--- a/parser/html/nsHtml5TreeBuilderCppSupplement.h
+++ b/parser/html/nsHtml5TreeBuilderCppSupplement.h
@@ -945,6 +945,9 @@ nsHtml5TreeBuilder::elementPopped(int32_t aNamespace, nsIAtom* aName, nsIContent
}
if (aNamespace == kNameSpaceID_SVG) {
if (aName == nsHtml5Atoms::svg) {
+ if (!scriptingEnabled || mPreventScriptExecution) {
+ return;
+ }
if (mBuilder) {
nsHtml5TreeOperation::SvgLoad(static_cast<nsIContent*>(aElement));
return;