From 3eba6b5a372058b0f9d9e326892ae59c16ab7c19 Mon Sep 17 00:00:00 2001 From: Sandor Takacs Date: Thu, 29 Dec 2022 13:21:25 +0100 Subject: [PATCH] Get changes from upstream --- listcommands.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/listcommands.php b/listcommands.php index 4b35ec0..abc8bd9 100644 --- a/listcommands.php +++ b/listcommands.php @@ -33,7 +33,7 @@ function storage_init($p) } else { $p['fetch_headers'] = trim(strtoupper(join(' ', $mailinglist_headers))); } - + return($p); } @@ -92,7 +92,7 @@ private function create_link($key, $value, $title) $targets = explode(',', $value); // only use 1 of the targets - $target = str_replace(array("'", '"'), '', $targets[0]); + $target = $this->strip_quotes($targets[0]); // first strip angle brackets $link = trim($target, "<>"); @@ -116,5 +116,10 @@ private function create_link($key, $value, $title) return($a); } + + private function strip_quotes($str) + { + return str_replace(array("'", '"'), '', $str); + } } ?>