aboutsummaryrefslogtreecommitdiffhomepage
path: root/nuldoc-src/html.ts
diff options
context:
space:
mode:
Diffstat (limited to 'nuldoc-src/html.ts')
-rw-r--r--nuldoc-src/html.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/nuldoc-src/html.ts b/nuldoc-src/html.ts
index d127d29..2832490 100644
--- a/nuldoc-src/html.ts
+++ b/nuldoc-src/html.ts
@@ -132,11 +132,11 @@ function textNodeToHtmlText(t: Text, ctx: Context): string {
}
function encodeSpecialCharacters(s: string): string {
- return s.replaceAll(/&(?!\w+;)/g, '&')
- .replaceAll(/</g, '&lt;')
- .replaceAll(/>/g, '&gt;')
- .replaceAll(/'/g, '&apos;')
- .replaceAll(/"/g, '&quot;');
+ return s.replaceAll(/&(?!\w+;)/g, "&amp;")
+ .replaceAll(/</g, "&lt;")
+ .replaceAll(/>/g, "&gt;")
+ .replaceAll(/'/g, "&apos;")
+ .replaceAll(/"/g, "&quot;");
}
function elementNodeToHtmlText(e: Element, ctx: Context): string {