fixed #1701 escaped " ' " for album creation and edit

This commit is contained in:
Matthieu Leproux
2022-09-26 14:47:42 +02:00
parent 4d81d28eca
commit d0e32547db
2 changed files with 5 additions and 3 deletions
+3 -2
View File
@@ -106,7 +106,8 @@ if (isset($_POST['submit']))
$conf['allow_html_descriptions'] ?
@$_POST['comment'] : strip_tags(@$_POST['comment']),
);
$data['name'] = pwg_db_real_escape_string($data['name']);
if ($conf['activate_comments'])
{
$data['commentable'] = isset($_POST['commentable'])? 'true':'false';
@@ -211,7 +212,7 @@ if (!empty($category['id_uppercat']))
$template->assign(
array(
'CATEGORIES_NAV' => preg_replace("# {2,}#"," ",preg_replace("#(\r\n|\n\r|\n|\r)#"," ",$navigation)),
'CATEGORIES_NAV' => preg_replace("# {2,}#"," ",preg_replace("#(\r\n|\n\r|\n|\r)#"," ",pwg_db_real_escape_string($navigation))),
'CAT_ID' => $category['id'],
'CAT_NAME' => @htmlspecialchars($category['name']),
'CAT_COMMENT' => @htmlspecialchars($category['comment']),