Injection of link url #315

Open
opened 2026-01-29 14:33:37 +00:00 by claunia · 0 comments
Owner

Originally created by @OpportunityLiu on GitHub (Aug 12, 2019).

![image]("onclick="alert('click')"://)

will be rendered to

<p><img src=""onclick="alert&#40;'click'&#41;"://" alt="image" /></p>

Escaping is done after :, but all chars are preserved before the protocal sep :.

https://babelmark.github.io/?text=!%5Bimage%5D(%22onclick%3D%22alert%26amp%3B%2340%3B%27click%27%26amp%3B%2341%3B%22%3A%2F%2F)

Originally created by @OpportunityLiu on GitHub (Aug 12, 2019). ```md ![image]("onclick="alert&amp;#40;'click'&amp;#41;"://) ``` will be rendered to ```html <p><img src=""onclick="alert&#40;'click'&#41;"://" alt="image" /></p> ``` Escaping is done after `:`, but all chars are preserved before the protocal sep `:`. https://babelmark.github.io/?text=!%5Bimage%5D(%22onclick%3D%22alert%26amp%3B%2340%3B%27click%27%26amp%3B%2341%3B%22%3A%2F%2F)
claunia added the bugPR Welcome! labels 2026-01-29 14:33:37 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#315