Skip to content

Commit 0aeae1a

Browse files
leakymemoryVishaalK
authored andcommitted
Add the <pre> and <code> tags to the list (#357)
When we moved to use SanitizeHtml we have a list of tags that are allowed. We missed a couple.
1 parent 63ce6b2 commit 0aeae1a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/scripts/domParsers/domUtils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export class DomUtils {
3636
canvas: "canvas",
3737
center: "center",
3838
cite: "cite",
39+
code: "code",
3940
del: "del",
4041
div: "div",
4142
em: "em",
@@ -68,6 +69,7 @@ export class DomUtils {
6869
object: "object",
6970
ol: "ol",
7071
p: "p",
72+
pre: "pre",
7173
progress: "progress",
7274
script: "script",
7375
span: "span",
@@ -112,7 +114,9 @@ export class DomUtils {
112114
DomUtils.tags.sup,
113115
DomUtils.tags.sub,
114116
DomUtils.tags.cite,
115-
DomUtils.tags.font
117+
DomUtils.tags.font,
118+
DomUtils.tags.pre,
119+
DomUtils.tags.code
116120
];
117121

118122
protected static htmlTags = [

0 commit comments

Comments
 (0)