Skip to content

Commit a92bd81

Browse files
committed
fix board restrictiveness
Signed-off-by: Anvay Mathur <[email protected]>
1 parent 0b148b6 commit a92bd81

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

src/content_script/home/Home.svelte

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,21 @@
4747
4848
$: if (board) {
4949
htmlT = sanitizeHtml(marked.parse(board.split("æ")[1]) as string, {
50-
allowedTags: ["b", "p", "i", "em", "strong"],
51-
allowedAttributes: {},
50+
allowedTags: [
51+
"b",
52+
"p",
53+
"i",
54+
"em",
55+
"strong",
56+
"h1",
57+
"h2",
58+
"h3",
59+
"h4",
60+
"h5",
61+
"h6",
62+
"a",
63+
],
64+
allowedAttributes: { a: ["href"] },
5265
});
5366
}
5467
</script>
@@ -104,7 +117,15 @@
104117
position: relative;
105118
}
106119
107-
:global(#boardText p) {
108-
margin-left: 0;
120+
:global(#boardText p),
121+
:global(#boardText h1),
122+
:global(#boardText h2),
123+
:global(#boardText h3),
124+
:global(#boardText h4),
125+
:global(#boardText h5),
126+
:global(#boardText h6),
127+
:global(#boardText strong),
128+
:global(#boardText em) {
129+
margin-left: 0 !important;
109130
}
110131
</style>

0 commit comments

Comments
 (0)