From 5e5aac91a4dd51d6f04cda15995b5330b57f68dd Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 22 Aug 2017 12:25:15 +0200 Subject: [PATCH] Skip command/location field if it contains only whitespace charaters Outlook sends COMMENT field with two newline characters. We should not display Comment record in iTip handling box in such cases, the same for location. --- plugins/libcalendaring/lib/libcalendaring_itip.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/libcalendaring/lib/libcalendaring_itip.php b/plugins/libcalendaring/lib/libcalendaring_itip.php index 91576f79..4c5ecafd 100644 --- a/plugins/libcalendaring/lib/libcalendaring_itip.php +++ b/plugins/libcalendaring/lib/libcalendaring_itip.php @@ -791,7 +791,7 @@ class libcalendaring_itip $table->add('label', $this->gettext('recurring')); $table->add('recurrence', $this->lib->recurrence_text($event['recurrence'])); } - if ($event['location']) { + if ($event['location'] && trim($event['location'])) { $table->add('label', $this->gettext('location')); $table->add('location', rcube::Q($event['location'])); } @@ -803,7 +803,7 @@ class libcalendaring_itip $table->add('label', $this->gettext('status')); $table->add('status', $this->gettext('status-' . strtolower($event['status']))); } - if ($event['comment']) { + if ($event['comment'] && trim($event['comment'])) { $table->add('label', $this->gettext('comment')); $table->add('location', rcube::Q($event['comment'])); }