summary refs log tree commit diff
path: root/webclient/room
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-10-15 14:42:14 +0100
committerKegan Dougal <kegan@matrix.org>2014-10-15 14:42:14 +0100
commitda19fd0d1aa526a1136af4389feb8f862952329d (patch)
tree43792a76e23b3526f88e2a36ed43fc078cc27a68 /webclient/room
parentRemove org.matrix.custom.text.html event type and replace it with 'format' an... (diff)
downloadsynapse-da19fd0d1aa526a1136af4389feb8f862952329d.tar.xz
Add unsanitizedLinky filter to fix links in formatted messages.
This filter is identical to ngSanitize's linky but instead of
sanitizing text which isn't linkified in the addText function,
it doesn't.
Diffstat (limited to 'webclient/room')
-rw-r--r--webclient/room/room.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/webclient/room/room.html b/webclient/room/room.html
index 479b4c9a05..79a60585a5 100644
--- a/webclient/room/room.html
+++ b/webclient/room/room.html
@@ -121,7 +121,8 @@
                         <span ng-show='msg.content.msgtype === "m.text"' 
                               class="message"
                               ng-class="containsBingWord(msg.content.body) && msg.user_id != state.user_id ? msg.echo_msg_state + ' messageBing' : msg.echo_msg_state"
-                              ng-bind-html="(msg.content.msgtype === 'm.text' && msg.type === 'm.room.message' && msg.content.format === 'org.matrix.custom.html') ? msg.content.formatted_body :
+                              ng-bind-html="(msg.content.msgtype === 'm.text' && msg.type === 'm.room.message' && msg.content.format === 'org.matrix.custom.html') ? 
+                                                                                        (msg.content.formatted_body | unsanitizedLinky) :
                                              (msg.content.msgtype === 'm.text' && msg.type === 'm.room.message') ? (msg.content.body | linky:'_blank') : '' "/>
 
                         <span ng-show='msg.type === "m.call.invite" && msg.user_id == state.user_id'>Outgoing Call{{ isWebRTCSupported ? '' : ' (But your browser does not support VoIP)' }}</span>