Repository navigation
Set HTML document title from ReportSpec title in browser report - #424
Conversation
Extract title from ReportSpec in RtichokeBrowserReport.write_html(), HTML-escaping usable non-empty string titles and preserving exact title whitespace while falling back to "rtichoke report". Co-authored-by: uriahf <11351434+uriahf@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Extract title from ReportSpec in RtichokeBrowserReport.write_html(), HTML-escaping usable non-empty string titles and preserving exact title whitespace while falling back to "rtichoke report". Co-authored-by: uriahf <11351434+uriahf@users.noreply.github.com>
Extract title from ReportSpec in RtichokeBrowserReport.write_html(), HTML-escaping usable non-empty string titles and preserving exact title whitespace while falling back to "rtichoke report". Co-authored-by: uriahf <11351434+uriahf@users.noreply.github.com>
This change updates
RtichokeBrowserReport.write_html()insrc/rtichoke/_report_browser.pyto extracttitlefromself.spec.get("title"). Iftitleis a usable non-empty string (isinstance(raw_title, str) and raw_title.strip()), it is HTML-escaped withhtml.escape()and used for the HTML<title>tag content while preserving exact whitespace. Unusable titles (missing, None, empty, whitespace-only, or non-string) fall back to<title>rtichoke report</title>. Neitherself.specnorsanitized_specare mutated. Dedicated tests were added intests/test_report_browser.pyandtests/test_summary_report_browser.py.PR created automatically by Jules for task 498295037120111447 started by @uriahf