summaryrefslogtreecommitdiffstats
path: root/apps/calendar
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-06-21 23:27:45 +0200
committerBart Visscher <bartv@thisnet.nl>2012-06-21 23:30:04 +0200
commitfd23c286ef9bf3851aefbc62c30cfc1659768847 (patch)
tree4f4e5240f4e01a65e2737ed0c368ac2ba6178188 /apps/calendar
parent4a22f4ca78a22d720c8e61233d7c6541f82f1c2b (diff)
downloadnextcloud-server-fd23c286ef9bf3851aefbc62c30cfc1659768847.tar.gz
nextcloud-server-fd23c286ef9bf3851aefbc62c30cfc1659768847.zip
Calendar: Fix caldav url encoding
Diffstat (limited to 'apps/calendar')
-rw-r--r--apps/calendar/js/calendar.js3
-rw-r--r--apps/calendar/templates/part.choosecalendar.rowfields.php2
2 files changed, 2 insertions, 3 deletions
diff --git a/apps/calendar/js/calendar.js b/apps/calendar/js/calendar.js
index 3b1be59381b..f8ab2fe4bde 100644
--- a/apps/calendar/js/calendar.js
+++ b/apps/calendar/js/calendar.js
@@ -207,8 +207,7 @@ Calendar={
}
},
showCalDAVUrl:function(username, calname){
- $('#caldav_url').val(totalurl + '/' + username + '/' + calname);
- $('#caldav_url').val(encodeURI($('#caldav_url').val()));
+ $('#caldav_url').val(totalurl + '/' + username + '/' + decodeURIComponent(calname));
$('#caldav_url').show();
$("#caldav_url_close").show();
},
diff --git a/apps/calendar/templates/part.choosecalendar.rowfields.php b/apps/calendar/templates/part.choosecalendar.rowfields.php
index 40c906b6969..4492ce731c9 100644
--- a/apps/calendar/templates/part.choosecalendar.rowfields.php
+++ b/apps/calendar/templates/part.choosecalendar.rowfields.php
@@ -8,7 +8,7 @@
<a href="#" onclick="Calendar.UI.Share.dropdown('<?php echo OCP\USER::getUser() ?>', <?php echo $_['calendar']['id'] ?>);" title="<?php echo $l->t('Share Calendar') ?>" class="action"><img class="svg action" src="<?php echo (!$_['shared']) ? OCP\Util::imagePath('core', 'actions/share.svg') : OCP\Util::imagePath('core', 'actions/shared.svg') ?>"></a>
</td>
<td width="20px">
- <a href="#" onclick="Calendar.UI.showCalDAVUrl('<?php echo OCP\USER::getUser() ?>', '<?php echo $_['calendar']['uri'] ?>');" title="<?php echo $l->t('CalDav Link') ?>" class="action"><img class="svg action" src="<?php echo OCP\Util::imagePath('core', 'actions/public.svg') ?>"></a>
+ <a href="#" onclick="Calendar.UI.showCalDAVUrl('<?php echo OCP\USER::getUser() ?>', '<?php echo rawurlencode(html_entity_decode($_['calendar']['uri'], ENT_QUOTES, 'UTF-8')) ?>');" title="<?php echo $l->t('CalDav Link') ?>" class="action"><img class="svg action" src="<?php echo OCP\Util::imagePath('core', 'actions/public.svg') ?>"></a>
</td>
<td width="20px">
<a href="?app=calendar&amp;getfile=export.php?calid=<?php echo $_['calendar']['id'] ?>" title="<?php echo $l->t('Download') ?>" class="action"><img class="svg action" src="<?php echo OCP\Util::imagePath('core', 'actions/download.svg') ?>"></a>