Skip to content

VideoPress: decode HTML entities in dashboard video titles#50429

Open
obenland wants to merge 1 commit into
trunkfrom
worktree-fix+videopress-entity-display
Open

VideoPress: decode HTML entities in dashboard video titles#50429
obenland wants to merge 1 commit into
trunkfrom
worktree-fix+videopress-entity-display

Conversation

@obenland

@obenland obenland commented Jul 10, 2026

Copy link
Copy Markdown
Member

Fixes #

Proposed changes

  • Fixes video titles rendering HTML entities literally (e.g. Gotte’s Hand, Land”) in the VideoPress dashboard.
  • Root cause: the new routes-based dashboard hooks map WP core's title.rendered (which is HTML-encoded) straight into the UI without decoding. This affects the library grid cards, the video-details header/breadcrumb, and the TITLE input.
  • Decode title.rendered with @wordpress/html-entities in src/dashboard/hooks/use-video.ts and src/dashboard/hooks/use-library.ts.
  • Adds unit tests to both hooks covering entity decoding.

Note: an earlier revision of this PR patched the legacy src/client/admin store (map-videos.ts), but that path reads the already-decoded jetpack_videopress.title and is not what the shipped dashboard uses — that change has been reverted so the diff is scoped to the real fix.

Testing instructions

  • On a site running the VideoPress dashboard, have a video whose title contains a character WordPress texturizes/encodes — e.g. a curly apostrophe or quote: Das schönste Land" in den Gau'n (returned by the REST API as Das schönste Land” in den Gau’n).
  • Go to Jetpack → VideoPress → Library.
    • Before: the card title shows literal entities (…Land” in den Gau’n).
    • After: it shows the decoded title (…Land" in den Gau'n).
  • Open the video's details page.
    • Confirm the breadcrumb header and the TITLE input both show the decoded title, not ”/’.
  • Verified live on a Jurassic Ninja site (edit page breadcrumb + title input, and the library grid card).

Does this pull request change what data or activity we track or use?

No.

@obenland obenland requested a review from a team as a code owner July 10, 2026 23:26
@obenland obenland added the [Status] Needs Review This PR is ready for review. label Jul 10, 2026
Copilot AI review requested due to automatic review settings July 10, 2026 23:26
@obenland obenland self-assigned this Jul 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack), and enable the worktree-fix+videopress-entity-display branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack worktree-fix+videopress-entity-display

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@jp-launch-control

jp-launch-control Bot commented Jul 10, 2026

Copy link
Copy Markdown

Code Coverage Summary

This PR did not change code coverage!

That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷

Full summary · PHP report · JS report

@obenland obenland changed the title VideoPress: decode HTML entities in My Videos admin UI VideoPress: decode HTML entities in dashboard video titles Jul 11, 2026
The routes-based dashboard hooks map WP core's `title.rendered` (which is
HTML-encoded) straight into the UI, so titles with entities such as
’ render literally in the library grid, the video-details
header/breadcrumb, and the title input. Decode `title.rendered` with
@wordpress/html-entities in use-video and use-library.

Verified live on a Jurassic Ninja site: "Das schönste Land” in den
Gau’n" now renders as "Das schönste Land" in den Gau'n" in the
breadcrumb, title input, and library card.

Claude-Session: https://claude.ai/code/session_017iXSXfNZEG4pNX1kGs3EVD
@obenland obenland force-pushed the worktree-fix+videopress-entity-display branch from 220e3cf to a80b52a Compare July 11, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants