← Whispering

fix: Add sanitize=False to ui.html() for NiceGUI compatibility

2049431abfb02eeb4c5e50976c19e3d8a832ae86 · Claude · Jan 28, 2026 01:03

NiceGUI requires explicit sanitize keyword argument for Html component.
Using sanitize=False because _text_to_html() already escapes user input
via html.escape(), and we need to preserve intentional <br> and <span>
tags in the rendered output.

https://claude.ai/code/session_0158RsuryxditNwJ4AGZEs3Z

+1 −1 · 1 file changed

  • src/whispering_ui/components/output.py +1 −1
diff --git a/src/whispering_ui/components/output.py b/src/whispering_ui/components/output.py
index 631f217..cc84254 100644
--- a/src/whispering_ui/components/output.py
+++ b/src/whispering_ui/components/output.py
@@ -160,7 +160,7 @@ def create_output_panels(state: AppState, bridge=None):
                     )
 
                     with scroll_container:
-                        html_panel = ui.html('').classes('w-full')
+                        html_panel = ui.html('', sanitize=False).classes('w-full')
                         html_panels[config['key']] = html_panel
 
         def update_outputs():