Make WordPress Core

Ticket #34527: 34527.2.patch

File 34527.2.patch, 625 bytes (added by swissspidy, 8 years ago)
  • src/wp-includes/js/wp-embed.js

    diff --git src/wp-includes/js/wp-embed.js src/wp-includes/js/wp-embed.js
    index db1fe5b..6e8c906 100644
     
    3131
    3232                        /* Resize the iframe on request. */
    3333                        if ( 'height' === data.message ) {
    34                                 height = data.value;
     34                                height = parseInt( data.value, 10 );
    3535                                if ( height > 1000 ) {
    3636                                        height = 1000;
    3737                                } else if ( height < 200 ) {
    3838                                        height = 200;
     39                                } else if ( isNaN( height ) ) {
     40                                        return;
    3941                                }
    4042
    41                                 source.height = (height) + 'px';
     43                                source.height = height;
    4244                        }
    4345
    4446                        /* Link to a specific URL on request. */