Skip to content

Commit

Permalink
Remove isset from tpl file
Browse files Browse the repository at this point in the history
Per civicrm#21935 it turns out isset will be
a blocker to ever doing escape on output so switching a couple of places to
empty. In the last case empty doesn't cut it so I added smarty:nodefaults
so that it would not be escaped.

isset doesn't work on the out put from a function
  • Loading branch information
eileenmcnaughton committed Nov 13, 2021
1 parent 9682b32 commit 0f925f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/CRM/common/TabHeader.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
<div id="mainTabContainer">
<ul>
{foreach from=$tabHeader key=tabName item=tabValue}
<li id="tab_{$tabName}" class="crm-tab-button ui-corner-all{if !$tabValue.valid} disabled{/if}{if isset($tabValue.class)} {$tabValue.class}{/if}" {if isset($tabValue.extra)}{$tabValue.extra}{/if}>
<li id="tab_{$tabName}" class="crm-tab-button ui-corner-all{if !$tabValue.valid} disabled{/if}{if !empty($tabValue.class)} {$tabValue.class}{/if}" {if !empty($tabValue.extra)}{$tabValue.extra}{/if}>
{if $tabValue.active}
<a href="{if !empty($tabValue.template)}#panel_{$tabName}{else}{$tabValue.link}{/if}" title="{$tabValue.title|escape}{if !$tabValue.valid} ({ts}disabled{/ts}){/if}">
{if !empty($tabValue.icon)}<i class="{$tabValue.icon}"></i>{/if}
<span>{$tabValue.title}</span>
{if isset($tabValue.count)}<em>{$tabValue.count}</em>{/if}
{if isset($tabValue.count|smarty:nodefaults)}<em>{$tabValue.count}</em>{/if}
</a>
{else}
<span {if !$tabValue.valid} title="{ts}disabled{/ts}"{/if}>{$tabValue.title}</span>
Expand Down

0 comments on commit 0f925f6

Please sign in to comment.