diff --git a/admin/cat_modify.php b/admin/cat_modify.php index 6eb1fbc5d..8690ea088 100644 --- a/admin/cat_modify.php +++ b/admin/cat_modify.php @@ -107,7 +107,6 @@ if (isset($_POST['submit'])) @$_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'; @@ -212,7 +211,7 @@ if (!empty($category['id_uppercat'])) $template->assign( array( - 'CATEGORIES_NAV' => preg_replace("# {2,}#"," ",preg_replace("#(\r\n|\n\r|\n|\r)#"," ",pwg_db_real_escape_string($navigation))), + 'CATEGORIES_NAV' => preg_replace("# {2,}#"," ",preg_replace("#(\r\n|\n\r|\n|\r)#"," ",$navigation)), 'CAT_ID' => $category['id'], 'CAT_NAME' => @htmlspecialchars($category['name']), 'CAT_COMMENT' => @htmlspecialchars($category['comment']), diff --git a/admin/themes/default/template/cat_modify.tpl b/admin/themes/default/template/cat_modify.tpl index 9b9b5a3ba..4886ead44 100644 --- a/admin/themes/default/template/cat_modify.tpl +++ b/admin/themes/default/template/cat_modify.tpl @@ -11,6 +11,7 @@ const has_images_associated_outside = '{"delete album and all %d photos, even the %d associated to other albums"|@translate|escape:javascript}'; const has_images_becomming_orphans = '{'delete album and the %d orphan photos'|@translate|escape:javascript}'; const has_images_recursives = '{'delete only album, not photos'|@translate|escape:javascript}'; +const cat_nav = '{$CATEGORIES_NAV|escape:javascript}'; {* *} var categoriesCache = new CategoriesCache({ @@ -38,7 +39,7 @@ categoriesCache.selectize(jQuery('[data-selectize=categories]'), { }); jQuery(document).ready(function() { - $("h1").append(' #{$CAT_ID} {$CATEGORIES_NAV}'); + $("h1").append(' #{$CAT_ID} '+cat_nav+''); jQuery(document).on('click', '.refreshRepresentative', function(e) { var $this = jQuery(this);