Hi there,
First off, thanks for the excellent WYSIWYG! It's been a real help to us.
Unfortunately we've run across a case in version 1.1.1 where it is possible to inject Javascript into the page.
Steps to reproduce:
- Visit a page with a WYSIWYG editor
- Disable Javascript
- Refresh the page
- Add some script e.g. <script>alert("Hallo!")</script> to the now-plain textarea.
- Save
- Enable Javascript and refresh the page
- A Javascript alert will pop up saying "Hallo!"
It seems to be able to do this by the fact that Hallo assumes that its content has been entered by itself. When it converts HTML to markdown it additionally adds a backslash to any ">" symbols it finds, thus rendering any HTML and Javascript entered in the WYSIWYG "disabled". So <script>alert("Hallo!")</script> would actually be cleansed to <script>alert("Hallo!")</script>
The problem therefore can occur when displaying text that hasn't been through Hallo's own save mechanism.
Many thanks,
Duncan