mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-04-22 02:32:01 +00:00
fix chat escaping
This commit is contained in:
parent
1edd2f3ea3
commit
06bcfec948
3 changed files with 7 additions and 7 deletions
|
|
@ -43,7 +43,7 @@ class MarbleGame {
|
|||
|
||||
static var instance:MarbleGame;
|
||||
|
||||
static var currentVersion = "1.7.2";
|
||||
static var currentVersion = "1.7.3";
|
||||
|
||||
var world:MarbleWorld;
|
||||
|
||||
|
|
|
|||
|
|
@ -89,10 +89,10 @@ class ChatCtrl extends GuiControl {
|
|||
if (StringTools.trim(this.chatHudInput.text.text) != "") {
|
||||
sendText = '<font color="#F29515">${StringTools.htmlEscape(Settings.highscoreName.substr(0, 20))}:</font> ${StringTools.htmlEscape(this.chatHudInput.text.text.substr(0, 150))}';
|
||||
if (Net.isClient) {
|
||||
NetCommands.sendChatMessage(StringTools.htmlEscape(sendText));
|
||||
NetCommands.sendChatMessage(sendText);
|
||||
}
|
||||
if (Net.isHost) {
|
||||
NetCommands.sendServerChatMessage(StringTools.htmlEscape(sendText));
|
||||
NetCommands.sendServerChatMessage(sendText);
|
||||
}
|
||||
}
|
||||
this.chatHudInput.text.text = "";
|
||||
|
|
@ -118,7 +118,7 @@ class ChatCtrl extends GuiControl {
|
|||
}
|
||||
|
||||
public function addChatMessage(text:String) {
|
||||
var realText = StringTools.htmlEscape(text);
|
||||
var realText = text;
|
||||
this.chats.push({
|
||||
text: realText,
|
||||
age: 10.0
|
||||
|
|
|
|||
|
|
@ -435,10 +435,10 @@ class MPPlayMissionGui extends GuiImage {
|
|||
if (StringTools.trim(chatInput.text.text) != "") {
|
||||
var sendText = '<font color="#F29515">${StringTools.htmlEscape(Settings.highscoreName.substr(0, 20))}:</font> ${StringTools.htmlEscape(chatInput.text.text.substr(0, 100))}';
|
||||
if (Net.isClient) {
|
||||
NetCommands.sendChatMessage(StringTools.htmlEscape(sendText));
|
||||
NetCommands.sendChatMessage(sendText);
|
||||
}
|
||||
if (Net.isHost) {
|
||||
NetCommands.sendServerChatMessage(StringTools.htmlEscape(sendText));
|
||||
NetCommands.sendServerChatMessage(sendText);
|
||||
}
|
||||
}
|
||||
chatInput.text.text = "";
|
||||
|
|
@ -729,7 +729,7 @@ class MPPlayMissionGui extends GuiImage {
|
|||
}
|
||||
|
||||
public static function addChatMessage(s:String) {
|
||||
var realText = StringTools.htmlEscape(s);
|
||||
var realText = s;
|
||||
allChats.push(realText);
|
||||
if (allChats.length > 100) {
|
||||
allChats = allChats.slice(allChats.length - 100);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue