Commit 7cf0dec
fix: escape URL in href attribute and display text in url-link-converter
The convertUrlsToLinks function places matched URLs directly into HTML
without escaping. While the regex excludes most HTML metacharacters,
the & character can appear in query strings and should be escaped as
& for valid HTML. Apply escapeHtml() to both the href attribute
value and the display text for defense-in-depth.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent cba49e7 commit 7cf0dec
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
0 commit comments