Skip to content

Commit e586419

Browse files
committed
HTML-unsafe tag
1 parent 82fa997 commit e586419

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

bin/ucd_to_json.mts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ const jsonEscape: { [key: string]: string } = {
2222
"000c": "\\f",
2323
};
2424

25+
const htmlUnsafe = new Set<String>([
26+
"003C", // <
27+
"003E", // >
28+
"0026", // &
29+
"0027", // '
30+
"0022", // "
31+
]);
32+
2533

2634
type SearchEntry = {
2735
code: string;
@@ -262,6 +270,9 @@ async function main() {
262270
if (encodeURIComponent(str) == str) {
263271
tags.push(`URIComponent-safe`);
264272
}
273+
if (htmlUnsafe.has(charData.cp)) {
274+
tags.push(`HTML-unsafe`);
275+
}
265276

266277
entries.push({
267278
code: charData.cp,

0 commit comments

Comments
 (0)