Do not escape hierarchical select
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 20 Mar 2022 21:29:28 +0000 (10:29 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 20 Mar 2022 21:29:28 +0000 (10:29 +1300)
We already have 'cutouts' in the escape function to not escape assigned html.
It isn't catching the hierarchical select elements - so I have marked a bunch
to not be escaped. I could have handled in 'escape' but I think tpl handling
is actually correct - the cutouts in the escape function was to get it to
a more manageable level

templates/CRM/Activity/Import/Form/MapTable.tpl
templates/CRM/Contact/Import/Form/MapTable.tpl
templates/CRM/Contact/Import/Form/Mapper.tpl
templates/CRM/Contribute/Import/Form/MapTable.tpl
templates/CRM/Custom/Form/Group.tpl
templates/CRM/Event/Import/Form/MapTable.tpl
templates/CRM/Member/Import/Form/MapTable.tpl
templates/CRM/UF/Form/Field.tpl

index 6ecd9c181db092e5b394f6c83f98a176d1b3aafe..97f3b7a2f37d44ccf84f343e732e24352210bfcb 100644 (file)
@@ -48,7 +48,7 @@
                     {if $wizard.currentStepName == 'Preview'}
                         {$mapper[$i]}
                     {else}
-                        {$form.mapper[$i].html}
+                        {$form.mapper[$i].html|smarty:nodefaults}
                     {/if}
                 </td>
 
index 6eb7c65346118859e45b50f130ab72728bb61c2f..20162b4cbc874299e5f24fd4dcd78476c34e25a1 100644 (file)
@@ -98,7 +98,7 @@
                             {*/if*}
                         {/if}
                     {else}
-                        {$form.mapper[$i].html}
+                        {$form.mapper[$i].html|smarty:nodefaults}
                     {/if}
                 </td>
 
index cc726d4496180cd2f75bf09e67f635fc91b59e4b..d2fa2f05247678f19b23f464ae7b510b81c15357 100644 (file)
@@ -15,7 +15,7 @@
    <dl>
      {section name=count start=1 loop=`$maxMapper`}
      {assign var='i' value=$smarty.section.count.index}
-       <dt>{$form.mapper[$i].label}</dt><dd>{$form.mapper[$i].html}<span class="tundra" id="id_map_mapper[{$i}]_1"><span id="id_mapper[{$i}]_1"></span></span><span class="tundra" id="id_map_mapper[{$i}]_2"><span id="id_mapper[{$i}]_2"></span></span><span class="tundra" id="id_map_mapper[{$i}]_3"><span id="id_mapper[{$i}]_3"></span></span></dd>
+       <dt>{$form.mapper[$i].label}</dt><dd>{$form.mapper[$i].html|smarty:nodefaults}<span class="tundra" id="id_map_mapper[{$i}]_1"><span id="id_mapper[{$i}]_1"></span></span><span class="tundra" id="id_map_mapper[{$i}]_2"><span id="id_mapper[{$i}]_2"></span></span><span class="tundra" id="id_map_mapper[{$i}]_3"><span id="id_mapper[{$i}]_3"></span></span></dd>
 
        {literal}
         <script type="text/javascript">
index 4c6909d271af2246ba39ffae96b5b820b400cf6a..4490a735b2538c3804d83bd6b98eda4cbf04b463 100644 (file)
@@ -50,7 +50,7 @@
           {$mapper[$i]}
       {/if}
                     {else}
-                        {$form.mapper[$i].html}
+                        {$form.mapper[$i].html|smarty:nodefaults}
                     {/if}
                 </td>
 
index e03c9e299ec8a280be194f094eda997149c038e5..2e7161cb1453dc2effd1a1aa949d357da7d8e1b4 100644 (file)
@@ -18,7 +18,7 @@
     </tr>
     <tr>
         <td class="label">{$form.extends.label}</td>
-        <td>{$form.extends.html} {help id="id-extends"}</td>
+        <td>{$form.extends.html|smarty:nodefaults} {help id="id-extends"}</td>
     </tr>
     <tr>
         <td class="label">{$form.weight.label}</td>
index 00d7072721c9ea1ae6223076c9191c95fd9ac059..204fc97c65f61de4c9e3883886e55d88482134b6 100644 (file)
@@ -46,7 +46,7 @@
                     {if $wizard.currentStepName == 'Preview'}
                         {$mapper[$i]}
                     {else}
-                        {$form.mapper[$i].html}
+                        {$form.mapper[$i].html|smarty:nodefaults}
                     {/if}
                 </td>
 
index 0a3dfec5ae28811f506ab057f538d23fd052180b..d64ac9f23b1e86845134c403244ee00943c74eb4 100644 (file)
@@ -46,7 +46,7 @@
                     {if $wizard.currentStepName == 'Preview'}
                         {$mapper[$i]}
                     {else}
-                        {$form.mapper[$i].html}
+                        {$form.mapper[$i].html|smarty:nodefaults}
                     {/if}
                 </td>
 
index 83a5056f7a06d3a38ef33b46695307dbcef1c15b..8fe08d44516ffb919fbbe7a87f69dadca14cb7af 100644 (file)
@@ -18,7 +18,7 @@
   <table class="form-layout-compressed">
     <tr class="crm-uf-field-form-block-field_name">
       <td class="label">{$form.field_name.label} {help id='field_name_0'}</td>
-      <td>{$form.field_name.html}<br />
+      <td>{$form.field_name.html|smarty:nodefaults}<br />
         <span class="description">&nbsp;{ts}Select the type of CiviCRM record and the field you want to include in this Profile.{/ts}</span></td>
     </tr>
     <tr class="crm-uf-field-form-block-label">