aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-07-27 12:37:12 +0000
committerplegall <plg@piwigo.org>2010-07-27 12:37:12 +0000
commit41757b9e1aab9ff4b3a75ac37ac01dde604d57d1 (patch)
treebe86409ac7deab19573f42ec30a8a72bae656d1a /admin
parent7a7569eda226df3a8d9a935b1e4a82a7902a7b80 (diff)
bug 1757 fixed: ability to use HTML in author field
git-svn-id: http://piwigo.org/svn/branches/2.1@6713 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin')
-rw-r--r--admin/element_set_unit.php4
-rw-r--r--admin/picture_modify.php6
2 files changed, 7 insertions, 3 deletions
diff --git a/admin/element_set_unit.php b/admin/element_set_unit.php
index 5dbeb4f68..17b83dcef 100644
--- a/admin/element_set_unit.php
+++ b/admin/element_set_unit.php
@@ -67,7 +67,7 @@ SELECT id, date_creation
$data['author'] = $_POST['author-'.$row['id']];
$data['level'] = $_POST['level-'.$row['id']];
- foreach (array('name', 'author', 'level') as $field)
+ foreach (array('name', 'level') as $field)
{
if (!empty($_POST[$field.'-'.$row['id']]))
{
@@ -238,7 +238,7 @@ SELECT
PHPWG_ROOT_PATH.'admin.php?page=picture_modify'.
'&amp;image_id='.$row['id'],
'NAME' => !empty($row['name'])?$row['name']:'',
- 'AUTHOR' => !empty($row['author'])?$row['author']:'',
+ 'AUTHOR' => !empty($row['author'])?htmlspecialchars($row['author']):'',
'LEVEL' => !empty($row['level'])?$row['level']:'0',
'DESCRIPTION' => !empty($row['comment'])?$row['comment']:'',
'DATE_CREATION_YEAR' => $year,
diff --git a/admin/picture_modify.php b/admin/picture_modify.php
index a764f0bdb..4d15a9206 100644
--- a/admin/picture_modify.php
+++ b/admin/picture_modify.php
@@ -236,7 +236,11 @@ $template->assign(
'REGISTRATION_DATE' => format_date($row['date_available']),
- 'AUTHOR' => isset($_POST['author']) ? $_POST['author'] : @$row['author'],
+ 'AUTHOR' => htmlspecialchars(
+ isset($_POST['author'])
+ ? stripslashes($_POST['author'])
+ : @$row['author']
+ ),
'DESCRIPTION' =>
htmlspecialchars( isset($_POST['description']) ?