From 085e7e4bfbb4c174950d13a86e1b9c5ca1992b18 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Sat, 3 Oct 2015 08:58:21 +0000 Subject: [PATCH] list.tpl: - base edit, editactive and delete links on $RAW_item to avoid double escaping ($items is already html-escaped, and we url-escape it for links). This fixes the remaining part of http://sourceforge.net/p/postfixadmin/bugs/356/ - simplify displaying "html" fields by using $RAW_item. This also fixes problems with funny[tm] item names that differ when html-encoded (like the ' char) git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1812 a1433add-5e2c-0410-b055-b7f2511e0802 --- templates/list.tpl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/templates/list.tpl b/templates/list.tpl index 2242321c..f5f50f22 100644 --- a/templates/list.tpl +++ b/templates/list.tpl @@ -51,7 +51,8 @@   -{foreach from=$items item=item} +{foreach from=$RAW_items item=RAW_item} + {assign "item" $items.{$RAW_item.$id_field|escape:"html"}} {* array keys in $items are html-escaped *} {#tr_hilightoff#} {foreach key=key item=field from=$struct} @@ -77,7 +78,7 @@ *} {elseif $key == 'active'} {if $item._can_edit} - {$item._active} + {$item._active} {else} {$item._active} {/if} @@ -109,7 +110,7 @@ {elseif $field.type == 'txtl'} {foreach key=key2 item=field2 from=$item.$key}{$field2}
{/foreach} {elseif $field.type == 'html'} - {$RAW_items.{$item.{$msg.id_field}}.$key} + {$RAW_item.$key} {else} {$linktext} {/if} @@ -118,8 +119,8 @@ {/if} {/foreach} - {if $item._can_edit}{$PALANG.edit}{else} {/if} - {if $item._can_delete}{if $item._can_edit}{$PALANG.edit}{else} {/if} + {if $item._can_delete}{$PALANG.del}{else} {/if} {/foreach}