Summary: | [iOS] YouTube plug-in replacement should support partial urls | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Eric Carlson <eric.carlson> | ||||||
Component: | Media | Assignee: | Eric Carlson <eric.carlson> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ap, commit-queue | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Eric Carlson
2014-12-08 08:41:10 PST
Created attachment 242816 [details]
Proposed patch.
Comment on attachment 242816 [details] Proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=242816&action=review > Source/WebCore/Modules/plugins/YouTubePluginReplacement.cpp:289 > + if (srcString.startsWith("//")) > + srcURL = URL(URL(), "http:" + srcString); > + else > + srcURL = URL(URL(), srcString); This does not look right, because for https pages, it should almost certainly use https, too. I'm only guessing about what and Flash/YouTube do, my instinct is that we should use Document::completeURL to handle any relative URLs, not just those without a scheme. (In reply to comment #2) > Comment on attachment 242816 [details] > Proposed patch. > > View in context: > https://bugs.webkit.org/attachment.cgi?id=242816&action=review > > > Source/WebCore/Modules/plugins/YouTubePluginReplacement.cpp:289 > > + if (srcString.startsWith("//")) > > + srcURL = URL(URL(), "http:" + srcString); > > + else > > + srcURL = URL(URL(), srcString); > > This does not look right, because for https pages, it should almost > certainly use https, too. > > I'm only guessing about what and Flash/YouTube do, my instinct is that we > should use Document::completeURL to handle any relative URLs, not just those > without a scheme. This is an excellent suggestion, thanks! Created attachment 242845 [details]
Updated patch.
Comment on attachment 242845 [details] Updated patch. Clearing flags on attachment: 242845 Committed r176977: <http://trac.webkit.org/changeset/176977> All reviewed patches have been landed. Closing bug. |