remove redundant escapes

This commit is contained in:
Shish 2020-01-28 00:16:22 +00:00
parent 9ac8246fa2
commit a887077ac8
3 changed files with 2 additions and 12 deletions

View file

@ -477,16 +477,6 @@ function url_escape(?string $input): string
return $input;
}
/**
* Make sure some data is safe to be used in SQL context
*/
function sql_escape(string $input): string
{
global $database;
return $database->escape($input);
}
/**
* Turn all manner of HTML / INI / JS / DB booleans into a PHP one
*/

View file

@ -295,7 +295,7 @@ class Notes extends Extension
"y1" => int_escape($_POST["note_y1"]),
"height" => int_escape($_POST["note_height"]),
"width" => int_escape($_POST["note_width"]),
"note" => sql_escape(html_escape($_POST["note_text"])),
"note" => $_POST["note_text"],
"image_id" => int_escape($_POST["image_id"]),
"id" => int_escape($_POST["note_id"])
];

View file

@ -45,7 +45,7 @@ class TaggerXML extends Extension
$p = strlen($s) == 1 ? " " : "\_";
$values = [
'p' => $p,
'sq' => "%".$p.sql_escape($s)."%"
'sq' => "%".$p.$s."%"
];
// Match