I am trying to find ways to deactivate WMD input .
In particular, I am trying to make HTML tags available only in the tags <code>that WMD generates. Is it possible,
My problem is that the following code displays as HTML, which can be used for potential XSS attacks .
For instance, <a onmouseover="alert(1)" href="#">read this!</a>
The above code is usually displayed both in preview mode and when saving to the database.
I noticed that Stack Overflow doesn't seem to have this problem. The same code just displays as text.
I noticed that the Qaru team shared their code at http://refactormycode.com/codes/333-sanitize-html . Do I really need to use C # in order to sanitize WMD?
source
share