Detect HTML in markdown submission forms
authorMagnus Hagander <magnus@hagander.net>
Tue, 5 Jun 2012 09:36:43 +0000 (11:36 +0200)
committerMagnus Hagander <magnus@hagander.net>
Tue, 5 Jun 2012 09:36:43 +0000 (11:36 +0200)
commite897b7a6a4862e77b5c0217eff6243b7c520a015
treef0e84a915aa048678e21f3a89027e8d8e3ffb326
parent845f12da7e01b0bb3b5ad50f9e48b90ed6fd2721
Detect HTML in markdown submission forms

This will do simple html detection based on trivial regexps. If HTML is found,
it will replace it with HTML_REMOVED and also show a warning (in red color,
no less) that this is not permitted.

The actual filtering is still done server-side later, so the fact that these
regexps are trickable if you really want to doesn't matter...

Fixes #164
media/js/showdown_preview.js