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:
parent
df717e8294
commit
c6592462ef
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue