Fix this one XSS issue

This commit is contained in:
Daniel_I_Am 2021-11-23 18:36:52 +01:00
parent c72b7b3b7f
commit ed023c475d

View File

@ -14,7 +14,7 @@ if (isset($_GET["name"]))
{ {
$name = $_GET["name"]; $name = $_GET["name"];
?> ?>
<div>Hey <?= $name ?>, how are you doing?</div> <div>Hey <?= htmlspecialchars($name) ?>, how are you doing?</div>
<div>Enjoy this picture:</div> <div>Enjoy this picture:</div>
<div><img src="//unsplash.it/256"></div> <div><img src="//unsplash.it/256"></div>
<hr> <hr>