TradingAgents/tradingagents
Youssef Aitousarrah 6a9a190af5 fix(ui): fix signal cards rendering as raw HTML in Streamlit
Two bugs were causing the signal card HTML to display as literal text:

1. CommonMark HTML block termination: Streamlit's markdown parser
   (CommonMark-compliant) terminates a <div> block at the first blank
   line. Empty optional fields (name_html, desc_html, risk_badge_html)
   left whitespace-only lines in the f-string template, ending the HTML
   block and causing the parser to render subsequent tags as text.
   Fixed by building HTML from a parts list and only appending optional
   elements when non-empty — no blank lines can appear in output.

2. Unescaped HTML chars in LLM-generated text: reason fields from the
   ranker contained raw > and & characters (e.g. '>5% move',
   '50 & 200 SMA') that corrupted the HTML structure. Fixed by running
   all LLM-generated fields through html.escape() before interpolation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 11:33:15 -08:00
..
agents Update 2026-02-20 08:38:15 -08:00
dataflows Update 2026-02-20 08:39:37 -08:00
graph chore: linter formatting + ML scanner logging, prompt control, ranker reasoning 2026-02-09 23:04:38 -08:00
ml chore: linter formatting + ML scanner logging, prompt control, ranker reasoning 2026-02-09 23:04:38 -08:00
schemas feat: discovery pipeline enhancements with ML signal scanner 2026-02-09 22:53:42 -08:00
tools chore: linter formatting + ML scanner logging, prompt control, ranker reasoning 2026-02-09 23:04:38 -08:00
ui fix(ui): fix signal cards rendering as raw HTML in Streamlit 2026-02-20 11:33:15 -08:00
utils feat: discovery pipeline enhancements with ML signal scanner 2026-02-09 22:53:42 -08:00
__init__.py feat: discovery system code quality improvements and concurrent execution 2026-02-05 23:27:01 -08:00
config.py feat: discovery pipeline enhancements with ML signal scanner 2026-02-09 22:53:42 -08:00
default_config.py feat: add daily discovery workflow, recommendation history, and scanner improvements 2026-02-11 22:07:02 -08:00