Alex-D / Trumbowyg

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

Escape all HTML Entities #1224

Closed CalvT closed 3 years ago

CalvT commented 3 years ago

Right now Trumbowyg escapes characters such as < and > into &lt; and &gt; which is great.

However it doesn't escape apostrophes and quotes into &apos; and &quot; (I'm guessing there could be a few others, but these are the ones that are important to me).

Could this be changed? Or could you point me to the area Tumbowyg does the current escaping so I can look at fixing this?

Thanks

Alex-D commented 3 years ago

Trumbowyg does not do this, it's the browser since Trumbowyg is based on a content editable div.

Sooo, there is no code to point you to :/

Why do you not manage that on form submit, or on the server-side?