From 5476bb3abda0e0589b4c867c413d2a46615f768c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20L=C3=BCbke?= Date: Wed, 1 Feb 2023 12:28:58 +0100 Subject: [PATCH] Ignore CSV labels with a whitespace Currently, exporting the alias list to CSV, the first column label is only a whitespace. For some reason the contents of this column consists of a long concatenation of "nbsp;"s. This fix ignores the whitespace column label and gets rid of the "nbsp;nbsp;......" contents of this column. This was successfully tested on a running installation of postfixadmin 3.2 on a Debian 11 system. --- public/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/list.php b/public/list.php index d0ead055..7a073cb0 100644 --- a/public/list.php +++ b/public/list.php @@ -120,7 +120,7 @@ if (safeget('output') == 'csv') { $columns = array(); foreach ($handler->getStruct() as $key => $field) { $label = trim($field['label']); - if ($field['display_in_list'] && $label != '') { # don't show fields without a label + if ($field['display_in_list'] && $label != '' && $label != ' ') { # don't show fields without a label and those with a whitespace $header[] = html_entity_decode($label, ENT_COMPAT | ENT_HTML401, 'UTF-8'); $columns[] = $key; }