Make WordPress Core

Ticket #31213: fix-31213.diff

File fix-31213.diff, 833 bytes (added by cweiske, 10 years ago)
  • src/wp-includes/class-oembed.php

    commit 7b30c661d8e6d7ca7991bfe1f5da09cca806ca22
    Author: Christian Weiske <cweiske@cweiske.de>
    Date:   Mon Feb 2 20:53:40 2015 +0100
    
        Fix oEmbed discovery for URLs with encoded entities
        
        Fixes #31213.
    
    diff --git src/wp-includes/class-oembed.php src/wp-includes/class-oembed.php
    index e5bc4a7..4862039 100644
    class WP_oEmbed { 
    352352                                        $atts = shortcode_parse_atts( $link );
    353353
    354354                                        if ( !empty($atts['type']) && !empty($linktypes[$atts['type']]) && !empty($atts['href']) ) {
    355                                                 $providers[$linktypes[$atts['type']]] = $atts['href'];
     355                                                $providers[$linktypes[$atts['type']]] = htmlspecialchars_decode($atts['href']);
    356356
    357357                                                // Stop here if it's JSON (that's all we need)
    358358                                                if ( 'json' == $linktypes[$atts['type']] )