In `EmbedLink`, a URL needs to be at least 11 chars to be useful.

Fixes #32059.

Built from https://develop.svn.wordpress.org/trunk@32463


git-svn-id: http://core.svn.wordpress.org/trunk@32433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-05-08 20:30:26 +00:00
parent b7d4685f3d
commit a417b2cf1a
3 changed files with 5 additions and 4 deletions

View File

@ -4543,8 +4543,9 @@ EmbedLink = wp.media.view.Settings.extend({
this.$('.embed-container').hide().find('.embed-preview').empty();
this.$( '.setting' ).hide();
// only proceed with embed if the field contains more than 6 characters
if ( url && ( url.length < 6 || ! url.match(/^http(s)?:\/\//) ) ) {
// only proceed with embed if the field contains more than 11 characters
// Example: http://a.io is 11 chars
if ( url && ( url.length < 11 || ! url.match(/^http(s)?:\/\//) ) ) {
return;
}

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32462';
$wp_version = '4.3-alpha-32463';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.