From 4d999e03a305999bb83946f7c947998237e2534c Mon Sep 17 00:00:00 2001 From: Moonchild Date: Wed, 23 Sep 2020 01:02:29 +0000 Subject: [SVG] Only fire the SVG onload when scripting is enabled and allowed --- parser/html/nsHtml5TreeBuilderCppSupplement.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'parser/html') 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(aElement)); return; -- cgit v1.2.3