summary refs log tree commit diff
path: root/syweb/webclient/components
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-11-05 11:21:55 +0000
committerKegan Dougal <kegan@matrix.org>2014-11-05 11:21:55 +0000
commit9f6d1b10ad5a9098a8f72157875ce97fc44bc423 (patch)
treeeadbd0f5f69522608c98c3f53e220d926584dda5 /syweb/webclient/components
parentAdd a bunch more unit tests for matrixService. (diff)
downloadsynapse-9f6d1b10ad5a9098a8f72157875ce97fc44bc423.tar.xz
Be sure to urlencode/decode event types correctly in both the web client and HS.
Diffstat (limited to 'syweb/webclient/components')
-rw-r--r--syweb/webclient/components/matrix/matrix-service.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/syweb/webclient/components/matrix/matrix-service.js b/syweb/webclient/components/matrix/matrix-service.js
index 5b63fb4a3b..e1e5b88b3e 100644
--- a/syweb/webclient/components/matrix/matrix-service.js
+++ b/syweb/webclient/components/matrix/matrix-service.js
@@ -375,9 +375,9 @@ angular.module('matrixService', [])
         
         
         sendStateEvent: function(room_id, eventType, content, state_key) {
-            var path = "/rooms/$room_id/state/"+eventType;
+            var path = "/rooms/$room_id/state/"+ encodeURIComponent(eventType);
             if (state_key !== undefined) {
-                path += "/" + state_key;
+                path += "/" + encodeURIComponent(state_key);
             }
             room_id = encodeURIComponent(room_id);
             path = path.replace("$room_id", room_id);