summary refs log tree commit diff
path: root/webclient/room/room.html
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-08-20 15:41:14 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-08-20 17:04:50 +0200
commitda2f5aac0eb2124654fe8e8c76f978cab31e9729 (patch)
treea1ce2251b19e062400aa7853d1089001e576d0a9 /webclient/room/room.html
parentGive the event_id of the failed event (diff)
downloadsynapse-da2f5aac0eb2124654fe8e8c76f978cab31e9729.tar.xz
Sanitize message text content only if the type of current message in the ng-repeat loop is "text"
In case of image message, the body can be a JSON object (ImageInfo) and ngSanitize does not like that (ie it generates exception in the console)
Diffstat (limited to '')
-rw-r--r--webclient/room/room.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/webclient/room/room.html b/webclient/room/room.html

index 99b0bf681b..e89bf670e3 100644 --- a/webclient/room/room.html +++ b/webclient/room/room.html
@@ -40,8 +40,8 @@ <td ng-class="!msg.content.membership_target ? (msg.content.msgtype === 'm.emote' ? 'emote text' : 'text') : 'membership text'"> <div class="bubble"> <span ng-hide='msg.content.msgtype !== "m.emote"' ng-bind-html="'* ' + (members[msg.user_id].displayname || msg.user_id) + ' ' + msg.content.body | linky:'_blank'"/> - <span ng-hide='msg.content.msgtype !== "m.text"' ng-bind-html="msg.content.body | linky:'_blank'"/> - <img class="image" ng-hide='msg.content.msgtype !== "m.image"' ng-src="{{ msg.content.url }}" alt="{{ msg.content.body }}"/> + <span ng-hide='msg.content.msgtype !== "m.text"' ng-bind-html="((msg.content.msgtype === 'm.text') ? msg.content.body : '') | linky:'_blank'"/> + <img class="image" ng-hide='msg.content.msgtype !== "m.image"' ng-src="{{ msg.content.url }}"/> </div> </td> <td class="rightBlock">