Skip to content

Commit

Permalink
fix(Html): Only escape unsage characters in HTML
Browse files Browse the repository at this point in the history
fixes #1730

Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Sep 29, 2024
1 parent b7fb65b commit a0ffb02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/serializers/Html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class HtmlSerializer implements Serializer {
}

_htmlentities_encode(string) {
return string.replace(/[\u00A0-\u9999<>&"]/g, char => '&#' + char.charCodeAt(0) + ';')
return string.replace(/[<>&"']/g, char => '&#' + char.charCodeAt(0) + ';')
}

_serializeFolder(folder, indent) {
Expand Down

0 comments on commit a0ffb02

Please sign in to comment.