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:
parent
aa616b1b45
commit
d944108b13
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue