Alex-D / Trumbowyg

A lightweight and amazing WYSIWYG JavaScript editor under 10kB
https://alex-d.github.io/Trumbowyg
MIT License
3.98k stars 609 forks source link

Closing tags on <br> <img> #1307

Closed wolfixsol closed 2 years ago

wolfixsol commented 2 years ago

The current implementation adds <br> for line breaks and <img src="" alt=""> for images as code. It would be very appreciated if this can be changed to <br /> and <img src="" alt="" /> as it would ease some efforts on other projects when it comes to application security checks (OWASP). Some sanitizers fail if a tag is not closed.

wolfixsol commented 2 years ago

It seems to be a browser behavior. <br> and <img src="" alt=""> are valid tags. Needs to be fixed in security check.