fix links + dashes in search queries

This commit is contained in:
root 2025-02-05 08:47:44 +01:00
parent 88534c9214
commit f05302cd7b
7 changed files with 279 additions and 174 deletions

View file

@ -53,7 +53,7 @@ require("header.php");
$query = htmlspecialchars($query);
// removes the risky characters
// there needs to be regex checking, only allow [a-zA-Z0-9.:/]
$query=preg_replace("/[^a-zA-Z0-9:\/.\ ]/", "", $query);
$query=preg_replace("/[^a-zA-Z0-9:\/.\ -]/", "", $query);