diff --git a/ground/controllers/ArticlesController.php b/ground/controllers/ArticlesController.php index c2eb6ca..beb4162 100644 --- a/ground/controllers/ArticlesController.php +++ b/ground/controllers/ArticlesController.php @@ -74,7 +74,7 @@ class ArticlesController extends Controller } $id = (int) $_POST['id']; - $title = $_POST['title']; + $title = strip_tags($_POST['title']); $text = str_replace(array('<','>'), array('<','>'), $_POST['text']); $html = strip_tags($_POST['text']); diff --git a/ground/controllers/JsonController.php b/ground/controllers/JsonController.php index 15765df..48afdde 100644 --- a/ground/controllers/JsonController.php +++ b/ground/controllers/JsonController.php @@ -186,6 +186,14 @@ class JsonController extends Controller App::redirect('/?point=' . $id); } + if (isset($_POST['name'])) { + $_POST['name'] = strip_tags($_POST['name']); + } + + if (isset($_POST['description'])) { + $_POST['description'] = strip_tags($_POST['description']); + } + if (!( isset($_POST['name']) && $_POST['name'] && strlen($_POST['name']) > 1 )) $errors[1] = 'Неверное название точки'; if (!( isset($_POST['img']) && (int) $_POST['img']))