mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Properly encode usernames and room titles
This commit is contained in:
parent
92ee11daba
commit
0622d64e28
@ -644,7 +644,7 @@ Fetch the roomlist from the server and update it in the GUI.
|
|||||||
for room in data.returnValues
|
for room in data.returnValues
|
||||||
li = $ '<li></li>'
|
li = $ '<li></li>'
|
||||||
li.addClass 'active' if room.active
|
li.addClass 'active' if room.active
|
||||||
$("""<a href="#{room.link}">#{room.title} <span class="badge">#{WCF.String.formatNumeric room.userCount}</span></a>""").addClass('timsChatRoom').data('roomID', room.roomID).appendTo li
|
$("""<a href="#{room.link}">#{WCF.String.escapeHTML(room.title)} <span class="badge">#{WCF.String.formatNumeric room.userCount}</span></a>""").addClass('timsChatRoom').data('roomID', room.roomID).appendTo li
|
||||||
$('#timsChatRoomList ul').append li
|
$('#timsChatRoomList ul').append li
|
||||||
|
|
||||||
if window.history?.replaceState?
|
if window.history?.replaceState?
|
||||||
@ -742,7 +742,7 @@ Open private channel
|
|||||||
|
|
||||||
if userID isnt 0
|
if userID isnt 0
|
||||||
$('#timsChatTopic').removeClass 'hidden empty'
|
$('#timsChatTopic').removeClass 'hidden empty'
|
||||||
$('#timsChatTopic > .topic').text WCF.Language.get 'chat.general.privateChannelTopic', {username: userList.allTime[userID].username}
|
$('#timsChatTopic > .topic').html WCF.Language.get 'chat.general.privateChannelTopic', {username: userList.allTime[userID].username}
|
||||||
$('#timsChatTopic > .jsTopicCloser').attr 'title', WCF.Language.get 'chat.general.closePrivateChannel'
|
$('#timsChatTopic > .jsTopicCloser').attr 'title', WCF.Language.get 'chat.general.closePrivateChannel'
|
||||||
|
|
||||||
unless $.wcfIsset "privateChannel#{userID}"
|
unless $.wcfIsset "privateChannel#{userID}"
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* @subpackage system.chat.command.commands
|
* @subpackage system.chat.command.commands
|
||||||
*/
|
*/
|
||||||
class InfoCommand extends \chat\system\command\AbstractCommand {
|
class InfoCommand extends \chat\system\command\AbstractCommand {
|
||||||
public $enableHTML = self::SETTING_ON;
|
|
||||||
public $lines = array();
|
public $lines = array();
|
||||||
public $user = null;
|
public $user = null;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user