Fix #102 - strip tags when saving incident

This commit is contained in:
Vojtěch Sajdl 2020-06-03 09:13:54 +02:00 committed by GitHub
parent 9eba848423
commit 570895c7bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -83,8 +83,8 @@ class Incident implements JsonSerializable
global $mysqli, $message; global $mysqli, $message;
$user_id = $_SESSION['user']; $user_id = $_SESSION['user'];
$type = $_POST['type']; $type = $_POST['type'];
$title = $_POST['title']; $title = strip_tags($_POST['title']);
$text = $_POST['text']; $text = strip_tags($_POST['text'], '<br>');
if (strlen($title)==0) if (strlen($title)==0)
{ {
@ -217,4 +217,4 @@ class Incident implements JsonSerializable
"username" => $this->username "username" => $this->username
]; ];
} }
} }