summaryrefslogtreecommitdiffstats
path: root/core/js/share.js
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-02-27 17:38:59 +0100
committerLukas Reschke <lukas@owncloud.com>2015-02-27 17:38:59 +0100
commit92b5517229e4d56fc64b91898c9950bd670f893e (patch)
tree01531cee80321fb21b92917afea3b23cf89eb897 /core/js/share.js
parent8abb80c64277524fadcbea875e2d559c339ef0b1 (diff)
downloadnextcloud-server-92b5517229e4d56fc64b91898c9950bd670f893e.tar.gz
nextcloud-server-92b5517229e4d56fc64b91898c9950bd670f893e.zip
Use custom attribute instead of the div identifier
Otherwise problems arrive when a username contains characters such as an `@` Fixes https://github.com/owncloud/user_shibboleth/issues/38
Diffstat (limited to 'core/js/share.js')
-rw-r--r--core/js/share.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 692ce0b0ba0..2370916e8be 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -666,7 +666,7 @@ OC.Share={
html += '<a href="#" class="unshare"><img class="svg" alt="'+t('core', 'Unshare')+'" title="'+t('core', 'Unshare')+'" src="'+OC.imagePath('core', 'actions/delete')+'"/></a>';
if (oc_config.enable_avatars === true) {
if (shareType === OC.Share.SHARE_TYPE_USER) {
- html += '<div id="avatar-' + escapeHTML(shareWith) + '" class="avatar"></div>';
+ html += '<div data-user="' + escapeHTML(shareWith) + '" class="avatar"></div>';
} else {
html += '<div class="avatar" style="padding-right: 32px"></div>';
}
@@ -703,7 +703,7 @@ OC.Share={
html += '</li>';
html = $(html).appendTo('#shareWithList');
if (oc_config.enable_avatars === true && shareType === OC.Share.SHARE_TYPE_USER) {
- $('#avatar-' + escapeHTML(shareWith)).avatar(escapeHTML(shareWith), 32);
+ $('.avatar[data-user="' + escapeHTML(shareWith) + '"]').avatar(escapeHTML(shareWith), 32);
}
// insert cruds button into last label element
var lastLabel = html.find('>label:last');