Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
fix(Calendar VCalendar) improve attachment filename handling
Browse files Browse the repository at this point in the history
Change-Id: I605ef3683e619399a0697d4fa76402c0b9438a3b
Reviewed-on: http://gerrit.tine20.com/customers/18673
Tested-by: Jenkins CI (http://ci.tine20.com/) <tine20-jenkins@metaways.de>
Reviewed-by: Paul Mehrer <p.mehrer@metaways.de>
  • Loading branch information
paulmhh committed Dec 16, 2020
1 parent 8e1eb89 commit 2854fc8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tine20/Calendar/Convert/Event/VCalendar/Abstract.php
Expand Up @@ -460,8 +460,10 @@ protected function _addAttachments($vevent, $vcalendar, $event)
*/
protected function _getAttachmentFilename($string)
{
$filename = str_replace([' ', '/'], '_', $string);
$filename = iconv("UTF-8", "ascii//TRANSLIT", $filename);
$string = str_replace([' ', '/'], '_', $string);
if (false === ($filename = @iconv("UTF-8", "ascii//TRANSLIT", $string))) {
$filename = iconv("UTF-8", "ascii//IGNORE", $string);
}

return $filename;
}
Expand Down

0 comments on commit 2854fc8

Please sign in to comment.