Make WordPress Core


Ignore:
Timestamp:
10/23/2018 05:47:28 PM (6 years ago)
Author:
danielbachhuber
Message:

Embeds: Filter HTML response in oEmbed proxy controller.

Adapts the response from WP_oEmbed_Controller::get_proxy_item() so that the response is correctly filtered and embeds work properly in JavaSccript editors. Introduces new get_oembed_response_data_for_url() function for preparing internal oEmbed responses.

Props danielbachhuber, imath, swissspidy.
Fixes #45142.

File:
1 edited

Legend:

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

    r41681 r43810  
    406406         * @since 2.9.0
    407407         *
    408          * @param string $data The returned oEmbed HTML.
    409          * @param string $url  URL of the content to be embedded.
    410          * @param array  $args Optional arguments, usually passed from a shortcode.
     408         * @param string|false $data The returned oEmbed HTML (false if unsafe).
     409         * @param string       $url  URL of the content to be embedded.
     410         * @param array        $args Optional arguments, usually passed from a shortcode.
    411411         */
    412412        return apply_filters( 'oembed_result', $this->data2html( $data, $url ), $url, $args );
Note: See TracChangeset for help on using the changeset viewer.