Repository navigation
fix(html): treat og:audio:url and og:video:url as asset sources - #24237
Closed
shreyanshj10 wants to merge 1 commit into
Closed
shreyanshj10 wants to merge 1 commit into
shreyanshj10 wants to merge 1 commit into
Conversation
Contributor
|
This PR has been automatically flagged as likely to be created by a bot, LLM, or agent, and will be automatically closed. These contributions harm the maintenance of the project. Please read our AI policy for more information. If you believe this is a mistake, please reply to this comment and we will review it. |
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.
assetSource.tstreatsog:image:urlas an asset URL but notog:audio:urlorog:video:url, while acceptingsecure_urlfor all three. So of the two tags below, theog:image:urlone gets its relative path rewritten in a build and theog:video:urlone does not — the output ships a meta tag pointing at a path that is not there.To be straight about the spec: ogp.me does not enumerate
og:video:urlorog:audio:url. It gives them only by reference — "theog:videotag has the identical tags asog:image", andog:audiohas "the first 3" of that list, whose first three areurl,secure_urlandtype. So the current list looks like it tracks the names ogp.me prints literally, which is a coherent rule, andog:image:urlis in it because the image section spells that one out.I think the better rule is the one applied in #11138 — whether the content is guaranteed to be a URL. These two are URL-valued under any reading:
og:image:urlis documented as "Identical toog:image", so by that same referenceog:video:urlis identical toog:video, which the list already takes and which ogp.me describes as "A URL to a video file that complements this object". So this adds the two names, atest.eachover all sixog:*:url/og:*:secure_urlvariants so the three media types stay in step if the list changes again, and the matching line indocs/guide/features.md, which spells the list out. I leftog:image:alt,og:video:widthand friends alone, since those are not URLs.This is a behaviour change with no issue behind it, so it is your call: if you would rather the list only carry property names the spec names literally, say so and I am happy to drop it.
I used an AI assistant on this. I wrote the test first and watched it fail on exactly
og:audio:urlandog:video:urlwhileog:image:urland the threesecure_urlvariants passed, which is what convinced me the gap was real and the test was not passing for the wrong reason. I also read ogp.me myself instead of trusting the assistant's summary of it.