Contacts: Fix name and carddav-url encoding

remotes/origin/stable45
Bart Visscher 13 years ago
parent fd23c286ef
commit 82f39d3292
  1. 2
      apps/contacts/js/contacts.js
  2. 4
      apps/contacts/templates/part.chooseaddressbook.rowfields.php

@ -77,7 +77,7 @@ Contacts={
} }
}, },
showCardDAVUrl:function(username, bookname){ showCardDAVUrl:function(username, bookname){
$('#carddav_url').val(totalurl + '/' + username + '/' + bookname); $('#carddav_url').val(totalurl + '/' + username + '/' + decodeURIComponent(bookname));
$('#carddav_url').show(); $('#carddav_url').show();
$('#carddav_url_close').show(); $('#carddav_url_close').show();
}, },

@ -2,10 +2,10 @@
<input id="active_<?php echo $_['addressbook']["id"]; ?>" type="checkbox" onClick="Contacts.UI.Addressbooks.activation(this, <?php echo $_['addressbook']["id"]; ?>)" <?php echo (OC_Contacts_Addressbook::isActive($_['addressbook']["id"]) ? ' checked="checked"' : ''); ?>> <input id="active_<?php echo $_['addressbook']["id"]; ?>" type="checkbox" onClick="Contacts.UI.Addressbooks.activation(this, <?php echo $_['addressbook']["id"]; ?>)" <?php echo (OC_Contacts_Addressbook::isActive($_['addressbook']["id"]) ? ' checked="checked"' : ''); ?>>
</td> </td>
<td> <td>
<label for="active_<?php echo $_['addressbook']["id"]; ?>"><?php echo htmlspecialchars($_['addressbook']["displayname"]); ?></label> <label for="active_<?php echo $_['addressbook']["id"]; ?>"><?php echo $_['addressbook']["displayname"]; ?></label>
</td> </td>
<td width="20px"> <td width="20px">
<a onclick="Contacts.UI.showCardDAVUrl('<?php echo OCP\USER::getUser(); ?>', '<?php echo rawurlencode($_['addressbook']["uri"]); ?>');" title="<?php echo $l->t("CardDav Link"); ?>" class="svg action globe"></a> <a onclick="Contacts.UI.showCardDAVUrl('<?php echo OCP\USER::getUser(); ?>', '<?php echo rawurlencode(html_entity_decode($_['addressbook']['uri'], ENT_QUOTES, 'UTF-8')); ?>');" title="<?php echo $l->t("CardDav Link"); ?>" class="svg action globe"></a>
</td> </td>
<td width="20px"> <td width="20px">
<a href="<?php echo OCP\Util::linkTo('contacts', 'export.php'); ?>?bookid=<?php echo $_['addressbook']["id"]; ?>" title="<?php echo $l->t("Download"); ?>" class="svg action download"></a> <a href="<?php echo OCP\Util::linkTo('contacts', 'export.php'); ?>?bookid=<?php echo $_['addressbook']["id"]; ?>" title="<?php echo $l->t("Download"); ?>" class="svg action download"></a>

Loading…
Cancel
Save