[wp-trac] [WordPress Trac] #34335: URL shorteners ( redirects) should to be supported by the embed handling for couple of hopes

WordPress Trac noreply at wordpress.org
Mon Aug 8 13:38:31 UTC 2016


#34335: URL shorteners ( redirects) should to be supported by the embed handling
for couple of hopes
--------------------------+-------------------------
 Reporter:  pbearne       |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Embeds        |     Version:  4.4
 Severity:  normal        |  Resolution:  maybelater
 Keywords:  2nd-opinion   |     Focuses:
--------------------------+-------------------------

Comment (by stephenharris):

 @swissspidy I've come across this issue in another context. Do we actually
 need to store the final URL?

 In the YouTube example above, and with WordPress, the discovered endpoint
 URL includes the ?url part, but WordPress over-writes it with the URL
 originally provided:
 https://github.com/WordPress/WordPress/blob/55c3fa0cb0637c85f89b225b3fde8d0256a9e463
 /wp-includes/class-oembed.php#L460

 Is that line necessary? The oembed discovery documentation
 (http://oembed.com/#section4) states that the provider is responsible for
 providing a full embed endpoint (including URL).

 Removing that line will fix the issue for embedding redirected urls, and
 shouldn't impact other cases.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34335#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list