Вырезание тегов из заголовка и описания при сохранении точки; Вырезание тегов при сохранении статьи
This commit is contained in:
parent
2af45127b8
commit
a08f5ca858
|
|
@ -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']);
|
||||
|
|
|
|||
|
|
@ -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']))
|
||||
|
|
|
|||
Loading…
Reference in New Issue