From 3c27988423cb1d9f16aa6429c8f8f17febfdd734 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Fri, 27 Sep 2019 15:48:35 +0300 Subject: [PATCH] Fix ic chatlogs displaying escaped html --- src/courtroom.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 5ffef45..dba7167 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -2134,7 +2134,8 @@ QString Courtroom::filter_ic_text(QString p_text, bool html, int target_pos, int // } // } - f_character = f_character.toHtmlEscaped(); + if (html) + f_character = f_character.toHtmlEscaped(); if (f_character == " " && html) //Whitespace, woah f_character = " "; //Turn it into an HTML entity @@ -2162,8 +2163,13 @@ QString Courtroom::filter_ic_text(QString p_text, bool html, int target_pos, int for (int c = 0; c < max_colors; ++c) { //Clear the stored optimization information - QString markdown_start = color_markdown_start_list.at(c).toHtmlEscaped(); - QString markdown_end = color_markdown_end_list.at(c).toHtmlEscaped(); + QString markdown_start = color_markdown_start_list.at(c); + QString markdown_end = color_markdown_end_list.at(c); + if (html) + { + markdown_start = markdown_start.toHtmlEscaped(); + markdown_end = markdown_end.toHtmlEscaped(); + } bool markdown_remove = color_markdown_remove_list.at(c); if (markdown_start.isEmpty()) //Not defined continue;