In `media/views/embed/link.js`, URLs should have a valid protocol before an attempt to fetch them is made.

Fixes #32037.


git-svn-id: https://develop.svn.wordpress.org/trunk@32459 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-05-08 18:33:34 +00:00
parent df717e8294
commit c6592462ef
2 changed files with 2 additions and 2 deletions

View File

@ -4546,7 +4546,7 @@ EmbedLink = wp.media.view.Settings.extend({
this.$( '.setting' ).hide(); this.$( '.setting' ).hide();
// only proceed with embed if the field contains more than 6 characters // only proceed with embed if the field contains more than 6 characters
if ( url && url.length < 6 ) { if ( url && ( url.length < 6 || ! url.match(/^http(s)?:\/\//) ) ) {
return; return;
} }

View File

@ -30,7 +30,7 @@ EmbedLink = wp.media.view.Settings.extend({
this.$( '.setting' ).hide(); this.$( '.setting' ).hide();
// only proceed with embed if the field contains more than 6 characters // only proceed with embed if the field contains more than 6 characters
if ( url && url.length < 6 ) { if ( url && ( url.length < 6 || ! url.match(/^http(s)?:\/\//) ) ) {
return; return;
} }