fix(gen-apidocs): unescape HTML entities in markdown generator descriptions - #466
fix(gen-apidocs): unescape HTML entities in markdown generator descriptions#466aman0408 wants to merge 1 commit into
Conversation
…ptions Unescape HTML entities like &kubernetes-sigs#34; and & in field and resource descriptions so that Hugo renders clean Markdown without raw entity codes. Ref kubernetes/website#56418
|
Welcome @aman0408! |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: aman0408 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@onlydole @divya-mohan0209 friendly ping to review the PR in case you missed it :) |

What type of PR is this?
/kind bug
What this PR does / why we need it:
Unescapes HTML entities (such as
",&,<,>) in field and resource descriptions rendered bygen-apidocs/generators/markdown.go.During configuration loading, OpenAPI descriptions are HTML-escaped into
DescriptionWithEntities. While the HTML backend (html.go) relies on web browsers to natively decode these entities when rendering HTML elements (<TD>/<P>), Hugo's Markdown parser (goldmark) emits HTML entities literally when they appear inside Markdown code spans or table cells (e.g. rendering`Name: "mysvc"`on kubernetes.io).Un-escaping descriptions before generating Markdown pages ensures clean, human-readable text and code blocks across the generated reference pages.
Which issue(s) this PR fixes:
Ref kubernetes/website#56418
Example affected page: Core v1 Endpoints
Does this PR introduce a user-facing change?