Repository navigation
[Backport 21.2.X] fix(@angular/build): escape prerender redirect URLs - #34508
alan-agius4 merged 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces HTML escaping for URLs interpolated into static redirect pages to prevent potential injection vulnerabilities. It adds an escapeHtml utility and updates generateRedirectStaticPage to escape characters like ampersands, angle brackets, and quotes. Unit and end-to-end tests are also added to verify the escaping behavior. Feedback suggests adding a nullish coalescing fallback in escapeHtml to prevent returning undefined if the regex is modified in the future without updating the character map.
Escape redirect targets before embedding them in the meta refresh tag and the fallback link of generated static redirect pages.
448de28 to
647a33a
Compare
|
This PR was merged into the repository. The changes were merged into the following branches:
|
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Backport of #33248