htmlをescape
方法
browserの場合
textContentなどに入れるか、HTML Sanitizer APIを使う
それ以外
自作する
https://stackoverflow.com/questions/1787322/what-is-the-htmlspecialchars-equivalent-in-javascript
deno_std/htmlを使う
https://deno.land/std@0.204.0/html/mod.ts
deno_stdにいつの間にこんなmoduleができてたんだ。知らなかったtakker.icon
htmlをunescapeするコードもある
/programming-notes/HTML文字列をescapeする
#2023-10-29 18:24:21
#2023-07-01 06:53:28