Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.

Conversation

@WirelessLife
Copy link
Collaborator

Potential fix for https://github.com/microsoft/AcademicContent/security/code-scanning/13

To fix the double-unescaping problem, the order of replacements in the unescape function should be changed so that the ampersand (&) is unescaped last. This ensures that any other entities (like ", ', etc.) are unescaped before the ampersand, preventing the accidental creation of new entities that would then be unescaped again. The fix involves moving the .replace(/&/g, '&') call to the end of the chain in the unescape function. No new imports or dependencies are needed, and the change is limited to the unescape method in the shown file.


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…caping

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@WirelessLife WirelessLife marked this pull request as ready for review August 20, 2025 19:06
@WirelessLife WirelessLife merged commit dbb9228 into main Aug 20, 2025
8 checks passed
@WirelessLife WirelessLife deleted the alert-autofix-13 branch August 20, 2025 19:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants