WordPress.org

Make WordPress Core

Ticket #40771: 40771.8.diff

File 40771.8.diff, 1.3 KB (added by westonruter, 2 years ago)
  • src/wp-admin/js/widgets/media-widgets.js

    diff --git src/wp-admin/js/widgets/media-widgets.js src/wp-admin/js/widgets/media-widgets.js
    index cd03b09633..1408b35d01 100644
    wp.mediaWidgets = ( function( $ ) { 
    142142                                        /**
    143143                                         * Fetch media.
    144144                                         *
    145                                          * This is a TEMPORARY measure until the WP API supports an oEmbed proxy endpoint. See #40450.
    146                                          *
    147                                          * @see https://core.trac.wordpress.org/ticket/40450
    148145                                         * @returns {void}
    149146                                         */
    150147                                        fetch: function() {
  • src/wp-includes/js/media-views.js

    diff --git src/wp-includes/js/media-views.js src/wp-includes/js/media-views.js
    index 1bdc6e6575..75cf452f50 100644
    EmbedUrl = View.extend({ 
    47394739        },
    47404740
    47414741        url: function( event ) {
    4742                 this.model.set( 'url', event.target.value );
     4742                this.model.set( 'url', $.trim( event.target.value ) );
    47434743        },
    47444744
    47454745        /**
  • src/wp-includes/js/media/views/embed/url.js

    diff --git src/wp-includes/js/media/views/embed/url.js src/wp-includes/js/media/views/embed/url.js
    index 3c99ca59ca..ab2863f1d0 100644
    EmbedUrl = View.extend({ 
    6060        },
    6161
    6262        url: function( event ) {
    63                 this.model.set( 'url', event.target.value );
     63                this.model.set( 'url', $.trim( event.target.value ) );
    6464        },
    6565
    6666        /**