Html renderer: reset tag so untagged text doesn't inherit last tag

pull/36284/head
Shane Smiskol 4 days ago
parent de805e4af7
commit 1b90b42647
  1. 3
      system/ui/widgets/html_render.py

@ -127,9 +127,10 @@ class HtmlRenderer(Widget):
# Always add content regardless of opening or closing tag # Always add content regardless of opening or closing tag
close_tag() close_tag()
# TODO: reset to None if end tag?
if is_start_tag: if is_start_tag:
current_tag = tag current_tag = tag
else:
current_tag = None
# increment after we add the content for the current tag # increment after we add the content for the current tag
if tag == ElementType.UL: if tag == ElementType.UL:

Loading…
Cancel
Save