htmlasp.netiiscode-injectionhtml-injections

Asp.net prevent HTML injection?


In asp.net how do i prevent html injection:

http://example.com?id=asd"%20href="http://google.com"><>

crome disallow but firefox allow to run that script. Is there any way to prevent HTML injection.

Thanks.


Solution

  • There is a Microsoft Tutorial about it: https://msdn.microsoft.com/en-us/library/ff647397.aspx

    and this one is about SQL Injection: https://msdn.microsoft.com/en-us/library/ff648339.aspx

    enter image description here

    ^^ still from the ms tuts...