aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2019-09-27 15:48:35 +0300
committerCrystalwarrior <varsash@gmail.com>2019-09-27 15:48:35 +0300
commit3c27988423cb1d9f16aa6429c8f8f17febfdd734 (patch)
treee403ff62709b7801cdc5d537d48b300786707a9f
parent1a3d3281a79856a19339292a281e5480f4825756 (diff)
Fix ic chatlogs displaying escaped html
-rw-r--r--src/courtroom.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index 5ffef459..dba7167a 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 = "&nbsp;"; //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;