From 7dcdd7b82da560272075e3dab1eb5f916e1ad8fa Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Fri, 11 Apr 2014 19:30:10 +0200 Subject: [PATCH] Use context aware text element quoting instead of sanitize. --- static/js/directives/chat.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/js/directives/chat.js b/static/js/directives/chat.js index 019c8a8b..a6c460b9 100644 --- a/static/js/directives/chat.js +++ b/static/js/directives/chat.js @@ -20,7 +20,7 @@ */ define(['underscore', 'text!partials/chat.html', 'text!partials/chatroom.html'], function(_, templateChat, templateChatroom) { - return ["$compile", "safeDisplayName", "mediaStream", "safeApply", "desktopNotify", "translation", "playSound", "fileUpload", "randomGen", "buddyData", "$timeout", "$sanitize", function($compile, safeDisplayName, mediaStream, safeApply, desktopNotify, translation, playSound, fileUpload, randomGen, buddyData, $timeout, $sanitize) { + return ["$compile", "safeDisplayName", "mediaStream", "safeApply", "desktopNotify", "translation", "playSound", "fileUpload", "randomGen", "buddyData", "$timeout", function($compile, safeDisplayName, mediaStream, safeApply, desktopNotify, translation, playSound, fileUpload, randomGen, buddyData, $timeout) { var displayName = safeDisplayName; var group_chat_id = ""; @@ -421,8 +421,8 @@ define(['underscore', 'text!partials/chat.html', 'text!partials/chatroom.html'], scope.$on("room", function(event, room) { var subscope = scope.showGroupRoom(null, {restore: true, noenable: true, noactivate: true}); if (room) { - var msg = translation._("You are now in room %s ...", $sanitize(room)); - subscope.$broadcast("display", null, $(""+msg+"")); + var msg = $("").text(translation._("You are now in room %s ...", room)); + subscope.$broadcast("display", null, $("").append(msg)); } });