summary refs log tree commit diff
path: root/webclient/room
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2014-08-16 22:21:52 +0100
committerMatthew Hodgson <matthew@matrix.org>2014-08-16 22:21:52 +0100
commit831c218a9312d15ab57d6d81f84f18fd332a4166 (patch)
treeb04b82da8985608a7c066cc1b3963fdbce9bb86c /webclient/room
parentuse minified angular by default (diff)
downloadsynapse-831c218a9312d15ab57d6d81f84f18fd332a4166.tar.xz
autohyperlink messages using linky
Diffstat (limited to '')
-rw-r--r--webclient/room/room-controller.js2
-rw-r--r--webclient/room/room.html4
2 files changed, 3 insertions, 3 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js
index fa50236571..86f1379f75 100644
--- a/webclient/room/room-controller.js
+++ b/webclient/room/room-controller.js
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */
 
-angular.module('RoomController', [])
+angular.module('RoomController', ['ngSanitize'])
 
 .controller('RoomController', ['$scope', '$http', '$timeout', '$routeParams', '$location', 'matrixService', 'eventStreamService', 'eventHandlerService',
                                function($scope, $http, $timeout, $routeParams, $location, matrixService, eventStreamService, eventHandlerService) {
diff --git a/webclient/room/room.html b/webclient/room/room.html
index 5712ce9b4f..2726188b4b 100644
--- a/webclient/room/room.html
+++ b/webclient/room/room.html
@@ -34,8 +34,8 @@
                 </td>
                 <td ng-class="!msg.content.membership_target ? (msg.content.msgtype === 'm.emote' ? 'emote text' : 'text') : ''">
                     <div class="bubble">
-                        {{ msg.content.msgtype === "m.emote" ? ("* " + (members[msg.user_id].displayname || msg.user_id) + " " + msg.content.body) : "" }}
-                        {{ msg.content.msgtype === "m.text" ? msg.content.body : "" }}
+                        <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 }}"/>
                     </div>
                 </td>