I want to prevent cross-site scripting attacks in web applications I make. If someone could provide me with some suggestions and advice, it would be really helpful.
jayashree10 15
Newbie Poster
AndreRet
commented:
Google is your friend here... +15
robertoben41
commented:
To prevent cross-site scripting (XSS) attacks, sanitize user inputs, validate and encode data before displaying, use Content Security Policy (CSP), an +0
Recommended Answers
Jump to PostI briefly answered your question here by saying:
To prevent cross-site scripting attacks, you similarly want to make sure that all text derived from user-generated input is HTML escaped. If using PHP, you can use the
htmlspecialchars()
function.It really is that simple, if you're using …
All 3 Replies
Dani 4,084
The Queen of DaniWeb Administrator Featured Poster Premium Member
gottaloveit 34
Newbie Poster
webhostingworld 0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.