Merge pull request #2099 from aisu-wata0/fix_css_decode_style
fix: css `decodeStyles`: remove `</br>` tags before parsing
This commit is contained in:
commit
d63638541b
|
@ -395,7 +395,8 @@ export function decodeStyleTags(text) {
|
|||
|
||||
return text.replaceAll(styleDecodeRegex, (_, style) => {
|
||||
try {
|
||||
const ast = css.parse(unescape(style));
|
||||
let styleCleaned = unescape(style).replaceAll(/<br\/>/g, '');
|
||||
const ast = css.parse(styleCleaned);
|
||||
const rules = ast?.stylesheet?.rules;
|
||||
if (rules) {
|
||||
for (const rule of rules) {
|
||||
|
|
Loading…
Reference in New Issue