Make WordPress Core

Ticket #45493: 45493.2.diff

File 45493.2.diff, 788 bytes (added by Christian1012, 5 years ago)
  • src/js/_enqueues/vendor/tinymce/plugins/wpeditimage/plugin.js

    diff --git a/src/js/_enqueues/vendor/tinymce/plugins/wpeditimage/plugin.js b/src/js/_enqueues/vendor/tinymce/plugins/wpeditimage/plugin.js
    index 0f0a5daf45..2c9b42ad17 100644
    a b tinymce.PluginManager.add( 'wpeditimage', function( editor ) { 
    221221                                // convert remaining line breaks to <br>
    222222                                caption = caption.replace( /\s*\n\s*/g, '<br />' );
    223223
     224                                // Convert escaped shortcode brackets to html entities.
     225                                caption = caption.replace( /\[{1,}/g, '&#91;' ).replace( /\]{1,}/g, '&#93;' );
     226
    224227                                return '[caption id="' + id + '" align="' + align + '" width="' + width + '"' + classes + ']' + c + ' ' + caption + '[/caption]';
    225228                        });