Files
log/src/lib/utils.ts
2026-01-15 23:47:13 +09:00

8 lines
176 B
TypeScript

export function escapeHtml(str: string): string {
return str
.replace(/&/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
}