fix: repair failing YouTube embeds in comments - #25929
Open
dcalhoun wants to merge 3 commits into
Open
Conversation
Formatting-only change, no behavior difference. Committed separately to keep the following bug fix diff reviewable. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmsWazuVWxvq6GuTtyxF43
YouTube requires an HTTP referrer for embedded players. Comment content was loaded with a nil baseURL, so the iframe sent no referrer and the player rendered 'Error 153 - Video player configuration error' instead of the video. Load comment HTML with the same https://wordpress.com/reader base URL that ReaderWebView uses for post content. Fixes #25928 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmsWazuVWxvq6GuTtyxF43
Collaborator
Generated by 🚫 Danger |
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmsWazuVWxvq6GuTtyxF43
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 33882 | |
| Version | PR #25929 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | bce96b8 | |
| Installation URL | 2jom4icfuokig |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 33882 | |
| Version | PR #25929 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | bce96b8 | |
| Installation URL | 2j0b61opq73r0 |
dcalhoun
marked this pull request as ready for review
August 22, 2026 16:57
dcalhoun
requested review from
crazytonyli
and
a lite review from Copilot
and removed request for
Copilot
August 22, 2026 16:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
YouTube videos embedded in Reader comments failed to play, showing "Error 153 — Video player configuration error" instead of the video.
YouTube's Required Minimum Functionality terms require embeds to send an HTTP referrer.
WebCommentContentRendererloaded comment HTML with anilbase URL, which gives the document anabout:blankorigin, so the embed iframe sent noRefererheader and the player refused to load.This is the same root cause as #24984, which fixed post content in
ReaderWebView. That fix set a real base URL but was never applied to the comment renderer. This PR loads comment HTML with the samehttps://wordpress.com/readerbase URL, so embeds behave consistently in posts and comments.Fix #25928. Fix CMM-2349.
Commits
style:applies swift-format to the file, no behavior change — split out so the fix diff stays reviewable.fix:the actual change, 8 lines.Testing instructions
Verified on device: Jetpack 27.2, iPhone 17, iOS 26.6.1.