Преглед на файлове

escape special char in avatar uri

isundil преди 6 години
родител
ревизия
17917dc8ef
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      srv/src/chatter.js

+ 2 - 2
srv/src/chatter.js

@@ -73,11 +73,11 @@ Chatter.prototype.update = function(userData, t) {
 };
 
 Chatter.prototype.getSmallIcon = function() {
-    return "api/avatar?user=" +this.id;
+    return "api/avatar?user=" +encodeURIComponent(this.id);
 };
 
 Chatter.prototype.getLargeIcon = function() {
-    return "api/avatar?size=l&user=" +this.id;
+    return "api/avatar?size=l&user=" +encodeURIComponent(this.id);
 };
 
 Chatter.prototype.getName = function() {