Drop support for noembed and noframes

Also remove everything after `<` inside `<style>`
This commit is contained in:
the-djmaze 2024-09-24 16:09:38 +02:00
parent 6b03820338
commit 85ac404722

View file

@ -32,7 +32,7 @@ const
'span','strong','sub','sup','time','u','var', 'span','strong','sub','sup','time','u','var',
// Deprecated by HTML Standard // Deprecated by HTML Standard
'acronym','big','center','dir','font','marquee', 'acronym','big','center','dir','font','marquee',
'nobr','noembed','noframes','plaintext','rb','rtc','strike','tt', 'nobr','plaintext','rb','rtc','strike','tt',
// Media Elements // Media Elements
'img',//'picture','source', 'img',//'picture','source',
// Table Elements // Table Elements
@ -169,8 +169,9 @@ const
// strip comments // strip comments
.replace(/\/\*[\s\S]*?\*\//gi, '') .replace(/\/\*[\s\S]*?\*\//gi, '')
// strip MS Word comments // strip MS Word comments
.replace(/<!--[\s\S]*?-->/gi, ''); .replace(/<!--[\s\S]*?-->/gi, '')
// strip HTML // strip HTML, as < is no CSS combinator anyway
.replace(/<[\s\S]*/gi, '');
// .replace(/<\/?[a-z][\s\S]*?>/gi, ''); // .replace(/<\/?[a-z][\s\S]*?>/gi, '');
// unified regex to match css & media queries together // unified regex to match css & media queries together