Calendar: Fix caldav url encoding

This commit is contained in:
Bart Visscher 2012-06-21 23:27:45 +02:00
parent 4a22f4ca78
commit fd23c286ef
2 changed files with 2 additions and 3 deletions

View File

@ -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();
},

View File

@ -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>