Skip to content

Commit 5b6b601

Browse files
authored
Merge pull request #279 from nextcloud/fix/calendar-names
fix: remove url encoding from calendar names
2 parents 5bda161 + 2e34a02 commit 5b6b601

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/Service/GoogleCalendarAPIService.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,13 @@ public function importCalendar(string $userId, string $calId, string $calName, ?
174174
$params['{http://apple.com/ns/ical/}calendar-color'] = $color;
175175
}
176176

177-
$newCalName = urlencode(trim($calName) . ' (' . $this->l10n->t('Google Calendar import') . ')');
177+
$newCalName = trim($calName) . ' (' . $this->l10n->t('Google Calendar import') . ')';
178+
$params['{DAV:}displayname'] = $newCalName;
179+
178180
$ncCalId = $this->calendarExists($userId, $newCalName);
179181
$calendarIsNew = is_null($ncCalId);
180182
if (is_null($ncCalId)) {
181-
$ncCalId = $this->caldavBackend->createCalendar('principals/users/' . $userId, $newCalName, $params);
183+
$ncCalId = $this->caldavBackend->createCalendar('principals/users/' . $userId, urlencode($newCalName), $params);
182184
}
183185

184186
// get color list

0 commit comments

Comments
 (0)