The wp_ai_client_prompt() page renders PHPDoc types containing < and > as HTML instead of text.
Actual
- The title drops generic contents, reducing the types to
...|list|list|null.
- The Parameters section displays escaped generated markup and curly quotes.
Cause
DevHub\get_signature() inserts parameter types unescaped before calling wp_kses_post(), so KSES treats generic syntax as tags.
DevHub\get_params() uses each raw type as both a CSS class and HTML content, producing malformed markup for types containing < or >.
Expected
Type expressions should be rendered as text, with generic delimiters serialized as < and >. Raw type expressions should not be used as class attributes.
Acceptance criteria
- The complete generic type is visible in the title and Parameters section.
- No visible text contains generated
<span class=... fragments or smart quotes.
- Existing type links and styling continue to work.
Related
WordPress/phpdoc-parser#270
The
wp_ai_client_prompt()page renders PHPDoc types containing<and>as HTML instead of text.Actual
...|list|list|null.Cause
DevHub\get_signature()inserts parameter types unescaped before callingwp_kses_post(), so KSES treats generic syntax as tags.DevHub\get_params()uses each raw type as both a CSS class and HTML content, producing malformed markup for types containing<or>.Expected
Type expressions should be rendered as text, with generic delimiters serialized as
<and>. Raw type expressions should not be used as class attributes.Acceptance criteria
<span class=...fragments or smart quotes.Related
WordPress/phpdoc-parser#270