aboutsummaryrefslogtreecommitdiffstats
path: root/entity.js
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-02-28 13:57:27 +0000
committerbptato <nincsnevem662@gmail.com>2021-02-28 13:59:03 +0000
commit5cbc514d15b5f4ce390b7fad5d17091431a38d9e (patch)
tree523051f20f368080840356d63a85ca64906201f1 /entity.js
parentSupport single-codepoint HTML entities specified by whatwg (diff)
downloadw3m-5cbc514d15b5f4ce390b7fad5d17091431a38d9e.tar.gz
w3m-5cbc514d15b5f4ce390b7fad5d17091431a38d9e.zip
Fix small mistakes in entity test generator
Diffstat (limited to 'entity.js')
-rw-r--r--entity.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/entity.js b/entity.js
index 69ca9be..98e884c 100644
--- a/entity.js
+++ b/entity.js
@@ -1,4 +1,4 @@
-//Usage: qjs --std entitytest.js [test/tab] > outfile
+//Usage: qjs --std entity.js [test/tab] > outfile
const a = getEntities();
@@ -39,7 +39,7 @@ function gentestitem(b, c, d) {
b +
"</td>" +
"<td>" +
- c.characters +
+ c.characters.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt') +
"</td>");
console.log(" </tr>");
}
@@ -47,7 +47,7 @@ function gentestitem(b, c, d) {
function gentest() {
console.log("<!DOCTYPE html>");
console.log("<head>");
- console.log(" <meta charset=\"utf-8\"");
+ console.log(" <meta charset=\"utf-8\">");
console.log("</head>");
console.log("<body>");
console.log(" <table>");