Disable html injection

This commit is contained in:
cents 2020-05-23 09:54:33 -07:00
parent 86cc795006
commit 53c72227c4

View File

@ -2293,12 +2293,10 @@ QString Courtroom::filter_ic_text(QString p_text, bool skip_filter,
bool delay_pop = false; bool delay_pop = false;
while (trick_check_pos < p_text.size()) { while (trick_check_pos < p_text.size()) {
f_character = p_text.at(trick_check_pos); f_character = p_text.at(trick_check_pos);
if (!skip_filter) {
if (f_character == "<") if (f_character == "<")
f_character = "&lt;"; f_character = "&lt;";
else if (f_character == ">") else if (f_character == ">")
f_character = "&gt;"; f_character = "&gt;";
}
// Escape character. // Escape character.
if (f_character == "\\" && !ic_next_is_not_special) { if (f_character == "\\" && !ic_next_is_not_special) {
ic_next_is_not_special = true; ic_next_is_not_special = true;
@ -2511,10 +2509,9 @@ QString Courtroom::filter_ic_text(QString p_text, bool skip_filter,
* \param p_text The text to be appended * \param p_text The text to be appended
* \param p_name The name of the character/entity who sent said text * \param p_name The name of the character/entity who sent said text
* \param is_songchange Whether we are appending a song entry * \param is_songchange Whether we are appending a song entry
* \param force_filter If we are sending plain text and we want to force the * \param force_filter If we are sending plain text and we want to force the filtering regardless of its status (e.g chat entry, song change etc)
* \param filtering regardless of its status (e.g chat entry, song change etc) * \param skip_filter If we are sending appending text such as html so we skip the html filter
* \param skip_filter If we are sending appending text such as html so we skip the * \param chat_color The color of the message sent
* \param filter chat_color The color of the message sent
*/ */
void Courtroom::append_ic_text(QString p_text, QString p_name, void Courtroom::append_ic_text(QString p_text, QString p_name,