You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On element documentation pages (e.g. /documentation/markdown), the sanitize parameter description appears twice with different levels of detail:
Demo section (top of page) — shows the full description:
sanitization mode: (default) uses client-side sanitization via setHTML or DOMPurify, disables sanitization (use only with trusted content), or pass a callable to apply server-side sanitization
Initializer section (under "Reference") — truncated to just:
This list comprehension only keeps lines containing :param. In reStructuredText docstrings, multi-line parameter descriptions use indented continuation lines that don't contain :param:
Only the first line (:param sanitize: sanitization mode:) is kept; the three continuation lines are silently dropped.
By contrast, the demo section in website/documentation/rendering.py line 26 uses str.replace() on the full multi-line string, so the continuation lines are preserved there.
This affects every element whose docstring has multi-line :param descriptions — ui.markdown is just one visible example.
NiceGUI Version
3.7.1 (current main)
Python Version
3.10
Browser
Chrome
Operating System
Linux
Note
This issue was filed by Claude Code on behalf of @evnchn
Description
On element documentation pages (e.g. /documentation/markdown), the
sanitizeparameter description appears twice with different levels of detail:Root cause
In
website/documentation/reference.pyline 31:This list comprehension only keeps lines containing
:param. In reStructuredText docstrings, multi-line parameter descriptions use indented continuation lines that don't contain:param:Only the first line (
:param sanitize: sanitization mode:) is kept; the three continuation lines are silently dropped.By contrast, the demo section in
website/documentation/rendering.pyline 26 usesstr.replace()on the full multi-line string, so the continuation lines are preserved there.This affects every element whose docstring has multi-line
:paramdescriptions —ui.markdownis just one visible example.NiceGUI Version
3.7.1 (current main)
Python Version
3.10
Browser
Chrome
Operating System
Linux
Note
This issue was filed by Claude Code on behalf of @evnchn