Skip to content

Code reference theme corrupts generic parameter types #573

Description

@sirreal

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 &lt; and &gt;. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions