Make WordPress Core

Ticket #45493: 45493.3.diff

File 45493.3.diff, 722 bytes (added by sabernhardt, 2 years ago)
  • src/js/_enqueues/vendor/tinymce/plugins/wpeditimage/plugin.js

     
    221221                                // Convert remaining line breaks to <br>.
    222222                                caption = caption.replace( /\s*\n\s*/g, '<br />' );
    223223
     224                                // Convert square brackets to HTML entities in the shortcode.
     225                                caption = caption.replace( /\[/g, '&#91;' ).replace( /\]/g, '&#93;' );
     226
    224227                                return '[caption id="' + id + '" align="' + align + '" width="' + width + '"' + classes + ']' + c + ' ' + caption + '[/caption]';
    225228                        });
    226229