- Make feedId required in generateRssFeed (removes dead /emails/ fallback) - Hoist loop-invariant conditional and remove intermediate variable - Extract normalizeAllowedSenders() so JSON and form paths share same logic - Move escapeHtml to src/utils/html.ts for reuse by admin.ts - Parallelize the two independent KV puts in feed creation Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
8 lines
177 B
TypeScript
8 lines
177 B
TypeScript
export function escapeHtml(str: string): string {
|
|
return str
|
|
.replace(/&/g, "&")
|
|
.replace(/</g, "<")
|
|
.replace(/>/g, ">")
|
|
.replace(/"/g, """);
|
|
}
|