avoid html injection

Solutions on MaxInterview for avoid html injection by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "avoid html injection"
Ailsa
13 Jun 2018
1//You can encode the "<" and ">" to their HTML equivelant
2html = html.replace(/</g, "<").replace(/>/g, ">");