Commit c21df7fd authored by chealer's avatar chealer

[FIX] Smarty {title} block escaping: Raw H1 titles

Reverts r35417, which itself reverted r34309, which exposed a non-breaking space regression for French fixed in r36051 (thanks Jyhem)
parent 3cbbfbf2
......@@ -53,28 +53,28 @@ function smarty_block_title($params, $content, &$smarty, $repeat) {
}
$html = '<h1>';
$html .= '<a class="' . $class . '"' . $metadata . ' href="' . $params['url'] . '">' . $content . "</a>\n";
$html .= '<a class="' . $class . '"' . $metadata . ' href="' . $params['url'] . '">' . htmlspecialchars($content) . "</a>\n";
if ($smarty->get_template_vars('print_page') != 'y') {
if ( $prefs['feature_help'] == 'y' && $prefs['helpurl'] != '' && $params['help'] != '' ) {
$html .= '<a href="' . $prefs['helpurl'] . rawurlencode($params['help']) . '" class="titletips" title="' . tra('Help page:') . ' ' . $content . '">'
$html .= '<a href="' . $prefs['helpurl'] . rawurlencode($params['help']) . '" class="titletips" title="' . tra('Help page:') . ' ' . htmlspecialchars($content) . '">'
. smarty_function_icon(array('_id' => 'help') , $smarty)
. "</a>\n";
}
if ($prefs['feature_edit_templates'] == 'y' && $tiki_p_edit_templates == 'y' && ($tpl = $smarty->get_template_vars('mid'))) {
$html .= '<a href="tiki-edit_templates.php?template=' . $tpl . '" class="titletips" title="' . tra('View or edit tpl:') . ' ' . $content . '">'
$html .= '<a href="tiki-edit_templates.php?template=' . $tpl . '" class="titletips" title="' . tra('View or edit tpl:') . ' ' . htmlspecialchars($content) . '">'
. smarty_function_icon(array('_id' => 'shape_square_edit', 'alt' => tra('Edit Template')), $smarty)
. "</a>\n";
} elseif ($prefs['feature_view_tpl'] == 'y' && $tiki_p_view_templates == 'y' && ($tpl = $smarty->get_template_vars('mid'))) {
$html .= '<a href="tiki-edit_templates.php?template=' . $tpl . '" class="titletips" title="' . tra('View tpl:') . ' ' . $content . '">'
$html .= '<a href="tiki-edit_templates.php?template=' . $tpl . '" class="titletips" title="' . tra('View tpl:') . ' ' . htmlspecialchars($content) . '">'
. smarty_function_icon(array('_id' => 'shape_square', 'alt' => tra('View Template')), $smarty)
. "</a>\n";
}
if ( $tiki_p_admin == 'y' && $params['admpage'] != '' ) {
$html .= '<a class="titletips" href="tiki-admin.php?page=' . $params['admpage'] . '" title="' . tra('Admin page:') . ' ' . $content . '">'
$html .= '<a class="titletips" href="tiki-admin.php?page=' . $params['admpage'] . '" title="' . tra('Admin page:') . ' ' . htmlspecialchars($content) . '">'
. smarty_function_icon(array('_id' => 'wrench', 'alt' => tra('Admin Feature')), $smarty)
. "</a>\n";
}
......
{* $Id$ *}
{title}{tr}Copy page:{/tr}&nbsp;{$page}{/title}
{title}{tr}Copy page:{/tr} {$page}{/title}
<div class="navbar">
{assign var=thispage value=$page|escape:url}
......
......@@ -31,7 +31,7 @@
});{/jq}
{/if}
{if $translation_mode eq 'n'}
{title}{if isset($hdr) && $prefs.wiki_edit_section eq 'y'}{tr}Edit Section{/tr}{else}{tr}Edit{/tr}{/if}: {$page}{if $pageAlias ne ''}&nbsp;({$pageAlias}){/if}{/title}
{title}{if isset($hdr) && $prefs.wiki_edit_section eq 'y'}{tr}Edit Section:{/tr}{else}{tr}Edit:{/tr}{/if} {$page}{if $pageAlias ne ''} ({$pageAlias}){/if}{/title}
{else}
{title}{tr}Update '{$page}'{/tr}{/title}
{/if}
......
{* $Id$ *}
<div style="margin:10px 20px 0px 20px">
{title}{tr}Forum:{/tr}&nbsp;{$forum_info.name}{/title}
{title}{tr}Forum:{/tr} {$forum_info.name}{/title}
<div class="top_post">
{include file='comment.tpl' first='y' comment=$thread_info thread_style='commentStyle_plain'}
......
{title}{tr}Rename page:{/tr}&nbsp;{$page}{/title}
{title}{tr}Rename page:{/tr} {$page}{/title}
<div class="navbar">
{assign var=thispage value=$page|escape:url}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment