summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--settings/js/personal.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js
index 0cf0cd81a7b..1202d9743d2 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -110,7 +110,7 @@ function showAvatarCropper () {
var $cropperImage = $('#cropper img');
$cropperImage.attr('src',
- OC.generateUrl('/avatar/tmp') + '?requesttoken=' + oc_requesttoken + '#' + Math.floor(Math.random() * 1000));
+ OC.generateUrl('/avatar/tmp') + '?requesttoken=' + encodeURIComponent(oc_requesttoken) + '#' + Math.floor(Math.random() * 1000));
// Looks weird, but on('load', ...) doesn't work in IE8
$cropperImage.ready(function () {
@@ -311,7 +311,7 @@ $(document).ready(function () {
var url = OC.generateUrl(
'/avatar/{user}/{size}',
{user: OC.currentUser, size: 1}
- ) + '?requesttoken=' + oc_requesttoken;
+ ) + '?requesttoken=' + encodeURIComponent(oc_requesttoken);
$.get(url, function (result) {
if (typeof(result) === 'object') {
$('#removeavatar').hide();