Make WordPress Core

Changeset 32463


Ignore:
Timestamp:
05/08/2015 08:29:55 PM (10 years ago)
Author:
wonderboymusic
Message:

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

Fixes #32059.

Location:
trunk/src/wp-includes/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-views.js

    r32462 r32463  
    45444544        this.$( '.setting' ).hide();
    45454545
    4546         // only proceed with embed if the field contains more than 6 characters
    4547         if ( url && ( url.length < 6 || ! url.match(/^http(s)?:\/\//) ) ) {
     4546        // only proceed with embed if the field contains more than 11 characters
     4547        // Example: http://a.io is 11 chars
     4548        if ( url && ( url.length < 11 || ! url.match(/^http(s)?:\/\//) ) ) {
    45484549            return;
    45494550        }
  • trunk/src/wp-includes/js/media/views/embed/link.js

    r32462 r32463  
    2828        this.$( '.setting' ).hide();
    2929
    30         // only proceed with embed if the field contains more than 6 characters
    31         if ( url && ( url.length < 6 || ! url.match(/^http(s)?:\/\//) ) ) {
     30        // only proceed with embed if the field contains more than 11 characters
     31        // Example: http://a.io is 11 chars
     32        if ( url && ( url.length < 11 || ! url.match(/^http(s)?:\/\//) ) ) {
    3233            return;
    3334        }
Note: See TracChangeset for help on using the changeset viewer.