Commit 5613469
fix: escape XML-unsafe characters in RSS feed output (#28)
The RSS feed interpolates author names directly into XML without
escaping. An author name containing < > & or other XML metacharacters
produces malformed XML that breaks RSS readers.
Also encode slug in URLs with encodeURIComponent for safety.
Add an escapeXml helper and apply it to the author field; use
encodeURIComponent for slug in link/guid URLs.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 06d0d76 commit 5613469
1 file changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
7 | 16 | | |
8 | 17 | | |
9 | 18 | | |
| |||
23 | 32 | | |
24 | 33 | | |
25 | 34 | | |
26 | | - | |
27 | | - | |
| 35 | + | |
| 36 | + | |
28 | 37 | | |
29 | | - | |
| 38 | + | |
30 | 39 | | |
31 | 40 | | |
32 | 41 | | |
| |||
0 commit comments