diff --git a/core/js/share.js b/core/js/share.js
index cb37dd7036..588202d227 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -149,9 +149,9 @@ OC.Share={
var html = '
';
if (data !== false && data.reshare !== false && data.reshare.uid_owner !== undefined) {
if (data.reshare.share_type == OC.Share.SHARE_TYPE_GROUP) {
- html += ''+t('core', 'Shared with you and the group {group} by {owner}', {group: data.reshare.share_with, owner: data.reshare.displayname_owner})+'';
+ html += ''+t('core', 'Shared with you and the group {group} by {owner}', {group: escapeHTML(data.reshare.share_with), owner: escapeHTML(data.reshare.displayname_owner)})+'';
} else {
- html += ''+t('core', 'Shared with you by {owner}', {owner: data.reshare.displayname_owner})+'';
+ html += ''+t('core', 'Shared with you by {owner}', {owner: escapeHTML(data.reshare.displayname_owner)})+'';
}
html += '
';
}