Skip to content

Commit

Permalink
bug 358 fixed : Accent are not correctly displayed in category listing
Browse files Browse the repository at this point in the history
		Removed calls to htmlentities()
improvement : charset added in HTTP header so browser's automatic encoding works even if httpd
		is not netto latin1
revert to original l10n() : use of htmlentities() didn't solve bug in IE tooltips

git-svn-id: http://piwigo.org/svn/trunk@1290 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
chrisaga committed Apr 29, 2006
1 parent 360e212 commit d05cacc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
4 changes: 2 additions & 2 deletions include/category_subcats.inc.php
Expand Up @@ -149,7 +149,7 @@
'categories.category',
array(
'SRC' => $thumbnail_src_of[ $category['picture'] ],
'ALT' => htmlentities($category['name'],ENT_QUOTES),
'ALT' => $category['name'],
'TITLE' => $lang['hint_category'],
'ICON' => get_icon(@$category['date_last']),

Expand All @@ -159,7 +159,7 @@
'cat_name' => $category['name'],
)
),
'NAME' => htmlentities($category['name'],ENT_QUOTES),
'NAME' => $category['name'],
'CAPTION_NB_IMAGES' => (($category['nb_images'] == 0) ? '' : sprintf("%d ".l10n('pictures'), $category['nb_images'])),
'DESCRIPTION' => @$category['comment'],
)
Expand Down
12 changes: 1 addition & 11 deletions include/functions.inc.php
Expand Up @@ -799,7 +799,7 @@ function get_name_from_file($filename)
* @param string key
* @return string
*/
function raw_l10n($key)
function l10n($key)
{
global $lang, $conf;

Expand All @@ -810,16 +810,6 @@ function raw_l10n($key)

return isset($lang[$key]) ? $lang[$key] : $key;
}
/**
* Like l10n but converts html entities
*
* @param string key
* @return string
*/
function l10n($key)
{
return htmlentities(raw_l10n($key),ENT_QUOTES);
}

/**
* returns the corresponding value from $themeconf if existing. Else, the
Expand Down
4 changes: 2 additions & 2 deletions include/functions_html.inc.php
Expand Up @@ -450,7 +450,7 @@ function get_html_menu_category($categories)
{
$menu.= ' rel="up"';
}
$menu.= '>'.htmlentities($category['name'],ENT_QUOTES).'</a>';
$menu.= '>'.$category['name'].'</a>';

if ($category['nb_images'] > 0)
{
Expand Down Expand Up @@ -550,7 +550,7 @@ function get_html_tag_selection(

$output.=
' />'
.' '. htmlentities($tag['name'],ENT_QUOTES)
.' '. $tag['name']
.'</label>'
.'</li>'
."\n"
Expand Down
1 change: 1 addition & 0 deletions include/page_header.php
Expand Up @@ -64,5 +64,6 @@
$template->assign_block_vars('refresh', array());
}

header('Content-Type: text/html; charset='.$lang_info['charset']);
$template->parse('header');
?>

0 comments on commit d05cacc

Please sign in to comment.