bug: escape backticks in svg text#5395
Conversation
|
Someone is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
👋 Hey @saurabhhhcodes! Thanks for your interest in contributing to CommitPulse! 🙏 Unfortunately, this PR has been automatically closed because you are not assigned to the linked issue #5264 — bug: Escape all special XML characters to prevent SVG attribute injection. To avoid this in the future, please follow these steps:
We look forward to your contribution once you're assigned! 🚀 |
Aamod-Dev
left a comment
There was a problem hiding this comment.
Solid escaping! I went through the changes and ensuring backticks are safely escaped inside SVG text nodes prevents malformed XML strings from breaking the image parser.
Labels applied:
- level:intermediate: String escaping logic.
- quality:clean: Protects the XML generator.
- ype:bug: Fixes rendering crashes.
Escapes backticks in SVG/XML text output so user-controlled strings cannot break out of attributes.\n\nValidation:\n- npm test -- --run lib/svg/generator.escapeXML.test.ts lib/svg/generator.test.ts\n\nCloses #5264