mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-08-05 17:14:16 +00:00
refactor: replace custom escapeHtml with Hono's html template
Hono's `html` tagged template auto-escapes all interpolated values; `raw()` is used for the email body which must render as HTML. This removes the ad-hoc utility and aligns entries.ts with the same pattern already used in admin.ts. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
5308544672
commit
41efee44ca
@@ -1,7 +0,0 @@
|
||||
export function escapeHtml(str: string): string {
|
||||
return str
|
||||
.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">")
|
||||
.replace(/"/g, """);
|
||||
}
|
||||
Reference in New Issue
Block a user