Make WordPress Core

Ticket #54789: 54789.diff

File 54789.diff, 1.1 KB (added by jeherve, 3 years ago)

Allow trailing slash in Twitter Profile embeds

  • src/wp-includes/class-wp-oembed.php

     
    6565                        '#https?://poll\.fm/.*#i'                      => array( 'https://api.crowdsignal.com/oembed', true ),
    6666                        '#https?://(.+\.)?survey\.fm/.*#i'             => array( 'https://api.crowdsignal.com/oembed', true ),
    6767                        '#https?://(www\.)?twitter\.com/\w{1,15}/status(es)?/.*#i' => array( 'https://publish.twitter.com/oembed', true ),
    68                         '#https?://(www\.)?twitter\.com/\w{1,15}$#i'  => array( 'https://publish.twitter.com/oembed', true ),
     68                        '#https?://(www\.)?twitter\.com/\w{1,15}\/?$#i' => array( 'https://publish.twitter.com/oembed', true ),
    6969                        '#https?://(www\.)?twitter\.com/\w{1,15}/likes$#i' => array( 'https://publish.twitter.com/oembed', true ),
    7070                        '#https?://(www\.)?twitter\.com/\w{1,15}/lists/.*#i' => array( 'https://publish.twitter.com/oembed', true ),
    7171                        '#https?://(www\.)?twitter\.com/\w{1,15}/timelines/.*#i' => array( 'https://publish.twitter.com/oembed', true ),