mirror of
https://github.com/pi-hole/web.git
synced 2026-04-26 19:55:15 +01:00
make use of utils.escapeHtml on the JS side of things, and html_entity_decode/htmlentities in PHP
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
@@ -161,9 +161,9 @@ function add_to_table($db, $table, $domains, $comment=null, $wildcardstyle=false
|
||||
if($wildcardstyle)
|
||||
$domain = "(\\.|^)".str_replace(".","\\.",$domain)."$";
|
||||
|
||||
$stmt->bindValue(":$field", $domain, SQLITE3_TEXT);
|
||||
$stmt->bindValue(":$field", htmlentities($domain), SQLITE3_TEXT);
|
||||
if($bindcomment) {
|
||||
$stmt->bindValue(":comment", $comment, SQLITE3_TEXT);
|
||||
$stmt->bindValue(":comment", htmlentities($comment), SQLITE3_TEXT);
|
||||
}
|
||||
|
||||
if($stmt->execute() && $stmt->reset())
|
||||
|
||||
Reference in New Issue
Block a user