executablebooks / mdit-py-plugins

Collection of core plugins for markdown-it-py
https://mdit-py-plugins.readthedocs.io
MIT License
30 stars 32 forks source link

✨ Add `allowed` option for inline/block attributes #115

Closed joker21663 closed 2 months ago

joker21663 commented 2 months ago

adding allowed attributes to protect against XSS attacks. An example of such an attack: asd{onerror="alert(1)"}

chrisjsewell commented 2 months ago

@joker21663 I reworked your PR 😅; to also work for blocks, and add a test

If you wanna have a look and comment before I merge

joker21663 commented 2 months ago

@joker21663 I reworked your PR 😅; to also work for blocks, and add a test

If you wanna have a look and comment before I merge

I'm not a programmer. I am a user who was forbidden by the security service to use your plugin without modification). I believe your code and I'm waiting for the merge and the new version so that I can use the plugin and make life easier for our accounting department. Thank you.