Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit 85ac404

Browse files
author
the-djmaze
committed
Drop support for noembed and noframes
Also remove everything after `<` inside `<style>`
1 parent 6b03820 commit 85ac404

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dev/Common/Html.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const
3232
'span','strong','sub','sup','time','u','var',
3333
// Deprecated by HTML Standard
3434
'acronym','big','center','dir','font','marquee',
35-
'nobr','noembed','noframes','plaintext','rb','rtc','strike','tt',
35+
'nobr','plaintext','rb','rtc','strike','tt',
3636
// Media Elements
3737
'img',//'picture','source',
3838
// Table Elements
@@ -169,8 +169,9 @@ const
169169
// strip comments
170170
.replace(/\/\*[\s\S]*?\*\//gi, '')
171171
// strip MS Word comments
172-
.replace(/<!--[\s\S]*?-->/gi, '');
173-
// strip HTML
172+
.replace(/<!--[\s\S]*?-->/gi, '')
173+
// strip HTML, as < is no CSS combinator anyway
174+
.replace(/<[\s\S]*/gi, '');
174175
// .replace(/<\/?[a-z][\s\S]*?>/gi, '');
175176

176177
// unified regex to match css & media queries together

0 commit comments

Comments
 (0)