Firefox: Fix parsing of style tags in creators notes

8d19a6e77f5d3d93545739114a05f429b4e11c2f

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -3Ignore whitespace
public/scripts/chats.js+2 -3
@@ -750,10 +750,9 @@ function getStyleContentsFromMarkdown(text) {
750 return '';750 return '';
751 }751 }
752752
753 const div = document.createElement('div');
754 const html = converter.makeHtml(substituteParams(text));753 const html = converter.makeHtml(substituteParams(text));
755 div.innerHTML = html;754 const parsedDocument = new DOMParser().parseFromString(html, 'text/html');
756 const styleElements = Array.from(div.querySelectorAll('style'));755 const styleElements = Array.from(parsedDocument.querySelectorAll('style'));
757 return styleElements756 return styleElements
758 .filter(s => s.textContent.trim().length > 0)757 .filter(s => s.textContent.trim().length > 0)
759 .map(s => s.textContent.trim())758 .map(s => s.textContent.trim())