Skip to content

Trac: Escape check run provider names and statuses in the PR status output. - #746

Closed
obenland wants to merge 1 commit into
WordPress:trunkfrom
obenland:fix/trac-pr-status-escaping
Closed

Trac: Escape check run provider names and statuses in the PR status output.#746
obenland wants to merge 1 commit into
WordPress:trunkfrom
obenland:fix/trac-pr-status-escaping

Conversation

@obenland

Copy link
Copy Markdown
Member

In the githubPRs module, prStatus() pushed the check_runs provider key (a GitHub App name) and its free-text status value into the returned string unescaped. renderPR() concatenates that string into the HTML passed to container.append(), so both rendered as markup instead of text.

This escapes both values with the same jQuery $( '<span>' ).text( value ).html() idiom already used for the review states below. The switch still matches on the raw value, so the in_progress/failed/success behavior is unchanged — only what gets rendered differs.

Note: PR #734 rewrites this file wholesale; its branch already carries the equivalent fix in the modernized style (obenland/wordpress.org@7b64e37f4), so whichever lands second resolves the overlap by keeping its own version.

🤖 Generated with Claude Code

…utput.

prStatus() pushed the check_runs provider key (a GitHub App name) and its
free-text status value into the rendered HTML unescaped, allowing markup
to reach container.append() in renderPR(). Escape both with the same
jQuery text()/html() idiom already used for the review states, while the
switch continues to match on the raw value.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 29, 2026 15:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props obenland.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@bazza bazza closed this in b57b3c5 Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants