Skip to content

Commit

Permalink
related to #1701 revert commit d0e3254, handle single quote problem i…
Browse files Browse the repository at this point in the history
…n frontend
  • Loading branch information
Matthieu Leproux committed Sep 26, 2022
1 parent a6d637e commit 092ded6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions admin/cat_modify.php
Expand Up @@ -107,7 +107,6 @@ function get_site_url($category_id)
@$_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';
Expand Down Expand Up @@ -212,7 +211,7 @@ function get_site_url($category_id)

$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']),
Expand Down
3 changes: 2 additions & 1 deletion admin/themes/default/template/cat_modify.tpl
Expand Up @@ -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}';

{* <!-- CATEGORIES --> *}
var categoriesCache = new CategoriesCache({
Expand Down Expand Up @@ -38,7 +39,7 @@ categoriesCache.selectize(jQuery('[data-selectize=categories]'), {
});

jQuery(document).ready(function() {
$("h1").append('<span title="{"Numeric identifier"|@translate}"> <span class="image-id">#{$CAT_ID}</span></span> <span style="letter-spacing:0" class="bc-albums">{$CATEGORIES_NAV}</span>');
$("h1").append('<span title="{"Numeric identifier"|@translate}"> <span class="image-id">#{$CAT_ID}</span></span> <span style="letter-spacing:0" class="bc-albums">'+cat_nav+'</span>');
jQuery(document).on('click', '.refreshRepresentative', function(e) {
var $this = jQuery(this);
Expand Down

0 comments on commit 092ded6

Please sign in to comment.