From f6fcc0f70b4a4530b667345068ec3a8eba167c87 Mon Sep 17 00:00:00 2001
From: Markus Dobmann
Date: Tue, 4 Jul 2023 10:06:40 +0200
Subject: [PATCH] fix unit tests for `sanitizeSectionContent`
---
client/lib/plugins/malformed-html-fixtures.js | 18 ++++++------------
.../plugins/test/sanitize-section-content.js | 8 +++-----
2 files changed, 9 insertions(+), 17 deletions(-)
diff --git a/client/lib/plugins/malformed-html-fixtures.js b/client/lib/plugins/malformed-html-fixtures.js
index 510d1198d1473..36c30584326a2 100644
--- a/client/lib/plugins/malformed-html-fixtures.js
+++ b/client/lib/plugins/malformed-html-fixtures.js
@@ -954,32 +954,27 @@ export default [
title: 'Tests against mXSS behavior with SVG in Chrome 77 and alike 1/2',
payload:
'
',
- expected: '</textarea><img src=x onerror=alert(1)>',
- expectedSSR: '<title><style>',
+ expected: '<title><style>',
},
{
title: 'Tests against mXSS behavior with SVG in Chrome 77 and alike 2/2',
payload: '',
- expected: '',
- expectedSSR: '<a id="">',
+ expected: '<a id="">',
},
{
title: 'Tests against mXSS behavior with MathML in Chrome 77 and alike',
payload: '',
- expected: '</textarea><img src=x onerror=alert(1)></mi></math>',
- expectedSSR: '<mi><style>',
+ expected: '<mi><style>',
},
{
title: 'Tests against mXSS behavior with SVG Templates in Chrome 77 and alike',
payload: '