Browse Source

escape special char in avatar uri

isundil 6 năm trước cách đây
mục cha
commit
17917dc8ef
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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() {