Make WordPress Core

Changeset 54652

Timestamp:
10/19/2022 11:58:46 PM (22 months ago)
Author:
pento
Message:

Embeds: Broaden the Tumblr oEmbed matcher to include all Tumblr URL structures.

Tumblr's oEmbed API correctly rejects invalid URLs, we can rely on that for the handful of cases that aren't embeddable URLs.

Props cbravobernal, bernhard-reiter.
Fixes #56733.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-oembed.php

    r54465 r54652  
    8181            '#https?://(www\.|embed\.)?ted\.com/talks/.*#i' => array( 'https://www.ted.com/services/v1/oembed.{format}', true ),
    8282            '#https?://(www\.)?(animoto|video214)\.com/play/.*#i' => array( 'https://animoto.com/oembeds/create', true ),
    83             '#https?://(.+)\.tumblr\.com/post/.*#i'        => array( 'https://www.tumblr.com/oembed/1.0', true ),
    84             '#https?://(www\.)?tumblr\.com/blog/view/[^/]+/.*#i' => array( 'https://www.tumblr.com/oembed/1.0', true ),
     83            '#https?://(.+)\.tumblr\.com/.*#i'        => array( 'https://www.tumblr.com/oembed/1.0', true ),
    8584            '#https?://(www\.)?kickstarter\.com/projects/.*#i' => array( 'https://www.kickstarter.com/services/oembed', true ),
    8685            '#https?://kck\.st/.*#i'                       => array( 'https://www.kickstarter.com/services/oembed', true ),
Note: See TracChangeset for help on using the changeset viewer.