mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
In EmbedLink, a URL needs to be at least 11 chars to be useful.
Fixes #32059. git-svn-id: https://develop.svn.wordpress.org/trunk@32463 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,8 +27,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user