WordPress.org

Make WordPress Core

Changeset 29730


Ignore:
Timestamp:
09/10/2014 11:02:05 PM (6 years ago)
Author:
azaozz
Message:

TinyMCE: fix image captions regexp when wpautop is disabled in wp_editor(). Fixes #29592 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js

    r29541 r29730  
    8383            }
    8484
    85             out = b.replace( /<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>/gi, function( a, b, c, caption ) {
     85            out = b.replace( /\s*<dl ([^>]+)>\s*<dt [^>]+>([\s\S]+?)<\/dt>\s*<dd [^>]+>([\s\S]*?)<\/dd>\s*<\/dl>\s*/gi, function( a, b, c, caption ) {
    8686                var id, classes, align, width;
    8787
     
    117117            });
    118118
    119             if ( out.indexOf('[caption') !== 0 ) {
     119            if ( out.indexOf('[caption') === -1 ) {
    120120                // the caption html seems broken, try to find the image that may be wrapped in a link
    121121                // and may be followed by <p> with the caption text.
Note: See TracChangeset for help on using the changeset viewer.