mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-11-20 23:43:26 +03:00
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.
This commit is contained in:
1 parent
fcf14f0165
commit
5476bb3abd
1 file changed
+1
-1
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user