Fix escape-by-default
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 3 Jan 2022 22:48:07 +0000 (11:48 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 3 Jan 2022 22:48:19 +0000 (11:48 +1300)
CRM/Custom/Page/Group.php
templates/CRM/Custom/Page/Group.tpl

index 65a6aac61752d969e55e5611fcce5076ba61ef6f..e462099b676481fe7c0655ac568fd066a94dad5e 100644 (file)
@@ -192,7 +192,7 @@ class CRM_Custom_Page_Group extends CRM_Core_Page {
     $customGroupStyle = CRM_Core_SelectValues::customGroupStyle();
     while ($dao->fetch()) {
       $id = $dao->id;
-      $customGroup[$id] = [];
+      $customGroup[$id] = ['class' => ''];
       CRM_Core_DAO::storeValues($dao, $customGroup[$id]);
       // form all action links
       $action = array_sum(array_keys(self::actionLinks()));
index e88f69057565deeaefa3bcd8c9f035838f44d5f4..be07b3f2406a53a136bf15892731ae9a014fba07 100644 (file)
         </thead>
         <tbody>
         {foreach from=$rows item=row}
-        <tr id="CustomGroup-{$row.id}" data-action="setvalue" class="crm-entity {cycle values="odd-row,even-row"}{if !empty($row.class)} {$row.class}{/if}{if NOT $row.is_active} disabled{/if}">
+        <tr id="CustomGroup-{$row.id}" data-action="setvalue" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
           <td>{$row.id}</td>
           <td class="crmf-title crm-editable">{$row.title}</td>
           <td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
           <td>{if $row.extends eq 'Contact'}{ts}All Contact Types{/ts}{else}{$row.extends_display}{/if}</td>
           <td>{if !empty($row.extends_entity_column_value)}{$row.extends_entity_column_value}{/if}</td>
-          <td class="nowrap">{$row.weight}</td>
+          <td class="nowrap">{$row.weight|smarty:nodefaults}</td>
           <td>{$row.style_display}</td>
-          <td>{$row.action|replace:'xx':$row.id}</td>
+          <td>{$row.action|smarty:nodefaults|replace:'xx':$row.id}</td>
         </tr>
         {/foreach}
         </tbody>