diff --git a/aotextarea.cpp b/aotextarea.cpp index a61a248..06ae81e 100644 --- a/aotextarea.cpp +++ b/aotextarea.cpp @@ -25,6 +25,7 @@ void AOTextArea::append_chatmessage(QString p_name, QString p_message) { if (i_word.startsWith("http")) { + i_word.replace("\n", "").replace("\r", ""); this->insertHtml("" + i_word + " "); } else diff --git a/courtroom.cpp b/courtroom.cpp index 2ac4f4f..71972a9 100644 --- a/courtroom.cpp +++ b/courtroom.cpp @@ -1192,13 +1192,10 @@ void Courtroom::chat_tick() else { QString f_character = f_message.at(tick_pos); + f_character = f_character.toHtmlEscaped(); if (f_character == " ") ui_vp_message->insertPlainText(" "); - else if (f_character == "<") - ui_vp_message->insertHtml("<"); - else if (f_character == ">") - ui_vp_message->insertHtml(">"); else if (m_chatmessage[TEXT_COLOR].toInt() == RAINBOW) { QString html_color;