WP oEmbed: Improve height attribute sanitization

Props afercia, swissspidy.
Fixes #34527.


git-svn-id: https://develop.svn.wordpress.org/trunk@35478 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-10-31 20:38:07 +00:00
parent aa616b1b45
commit d944108b13
1 changed files with 3 additions and 3 deletions

View File

@ -31,14 +31,14 @@
/* Resize the iframe on request. */
if ( 'height' === data.message ) {
height = data.value;
height = parseInt( data.value, 10 );
if ( height > 1000 ) {
height = 1000;
} else if ( height < 200 ) {
} else if ( ~~height < 200 ) {
height = 200;
}
source.height = (height) + 'px';
source.height = height;
}
/* Link to a specific URL on request. */