php - Xss when echoing direct from url -
this question has answer here:
- how prevent xss html/php? 8 answers
i printing directly form url
if(isset($_get['name']){ echo $_get['name']) }
but friend told me bad , vulnerable xss how bad , should prevent xss?
just wrap content should not contain tags in htmlspecialchars
echo htmlspecialchars($_get["name"]);
Comments
Post a Comment