Explorar o código

xss protection

Philip Wittamore hai 9 meses
pai
achega
2a2a43f3ee
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      blog/search.php

+ 1 - 1
blog/search.php

@@ -1,7 +1,7 @@
 <?php
 $string = "";
 if (isset($_POST["s"])) {
-    $string = $_POST["s"];
+    $string = htmlspecialchars($_POST["s"]);
 }
 ?>
 <!doctype html>