VideoPress: decode HTML entities in dashboard video titles#50429
VideoPress: decode HTML entities in dashboard video titles#50429obenland wants to merge 1 commit into
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryThis 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. 🤷 |
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
220e3cf to
a80b52a
Compare
Fixes #
Proposed changes
Gotte’s Hand,Land”) in the VideoPress dashboard.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.title.renderedwith@wordpress/html-entitiesinsrc/dashboard/hooks/use-video.tsandsrc/dashboard/hooks/use-library.ts.Note: an earlier revision of this PR patched the legacy
src/client/adminstore (map-videos.ts), but that path reads the already-decodedjetpack_videopress.titleand is not what the shipped dashboard uses — that change has been reverted so the diff is scoped to the real fix.Testing instructions
Das schönste Land" in den Gau'n(returned by the REST API asDas schönste Land” in den Gau’n).…Land” in den Gau’n).…Land" in den Gau'n).”/’.Does this pull request change what data or activity we track or use?
No.