From d39851789afb38dc73d84a5bc11b12b0814113a3 Mon Sep 17 00:00:00 2001 From: Dan Lawrence Date: Tue, 6 Dec 2022 19:15:52 +0000 Subject: [PATCH] Fix bug in append text for text box --- pygame_gui/elements/ui_text_box.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pygame_gui/elements/ui_text_box.py b/pygame_gui/elements/ui_text_box.py index 471f6550..ad7e3573 100644 --- a/pygame_gui/elements/ui_text_box.py +++ b/pygame_gui/elements/ui_text_box.py @@ -904,10 +904,10 @@ def append_html_text(self, new_html_str: str): :param new_html_str: The, potentially HTML tag, containing string of text to append. """ if self.should_html_unescape_input_text: - self.appended_text += html.unescape(new_html_str) + feed_input = html.unescape(new_html_str) else: - self.appended_text += new_html_str - feed_input = self.appended_text + feed_input = new_html_str + self.appended_text += feed_input if self.plain_text_display_only: # if we are supporting only plain text rendering then we turn html input into text at this point feed_input = html.escape(feed_input) # might have to add true to second param here for quotes