From d944108b1320be716832501711dbb953a1b57449 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 31 Oct 2015 20:38:07 +0000 Subject: [PATCH] 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 --- src/wp-includes/js/wp-embed.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/js/wp-embed.js b/src/wp-includes/js/wp-embed.js index db1fe5b2dd..ea7f5eb207 100644 --- a/src/wp-includes/js/wp-embed.js +++ b/src/wp-includes/js/wp-embed.js @@ -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. */