Make WordPress Core

Ticket #29526: 29526.patch

File 29526.patch, 763 bytes (added by iseulde, 11 years ago)
  • src/wp-includes/js/mce-view.js

     
    877877
    878878        wp.mce.views.register( 'embedURL', _.extend( {}, wp.mce.embedMixin, {
    879879                toView: function( content ) {
    880                         var re = /(?:^|<p>)(https?:\/\/[^\s"]+?)(?:<\/p>\s*|$)/gi,
     880                        var re = /(^|<p>)(https?:\/\/[^\s"]+?)(<\/p>\s*|$)/gi,
    881881                                match = re.exec( tinymce.trim( content ) );
    882882
    883883                        if ( ! match ) {
     
    885885                        }
    886886
    887887                        return {
    888                                 index: match.index,
    889                                 content: match[0],
     888                                index: match.index + match[1].length,
     889                                content: match[2],
    890890                                options: {
    891                                         url: match[1]
     891                                        url: match[2]
    892892                                }
    893893                        };
    894894                }