mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-07 14:14:36 +00:00
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:
@@ -4546,7 +4546,7 @@ EmbedLink = wp.media.view.Settings.extend({
|
||||
this.$( '.setting' ).hide();
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ EmbedLink = wp.media.view.Settings.extend({
|
||||
this.$( '.setting' ).hide();
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user