0

How can I validate a valid looking html like below while validating html content received from a user/service. $sanitize does not seem to identify it.

For example,

<img src='image' onError='alert()' />

How can I also remove some of the invalud HTML like alert()? Or does $sanitize treat these kind of blocks as valid HTML?

TIA

maddie
  • 629
  • 10
  • 29

0 Answers0