mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-10-27 03:29:58 -04:00
HTML-sanitize all text elements
This commit is contained in:
1 parent
fb7c07f593
commit
66d599db99
1 file changed
+2
-2
@@ -246,7 +246,7 @@ func NewElement(node *bf.Node) Element {
|
||||
Pre: "",
|
||||
Post: "",
|
||||
Fragments: []Fragment{{
|
||||
Token: string(node.Literal),
|
||||
Token: stripper.Sanitize(string(node.Literal)),
|
||||
Style: Text,
|
||||
}},
|
||||
}
|
||||
@@ -300,7 +300,7 @@ func NewElement(node *bf.Node) Element {
|
||||
Pre: "",
|
||||
Post: "",
|
||||
Fragments: []Fragment{{
|
||||
Token: string(node.Literal),
|
||||
Token: strings.TrimSpace(stripper.Sanitize(string(node.Literal))) + "\n",
|
||||
Style: HTMLSpan,
|
||||
}},
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user