WordPress.org

Make WordPress Core

Ticket #45493: 45493.diff

File 45493.diff, 787 bytes (added by Christian1012, 3 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( /\[{2}/g, '&#91;' ).replace( /\]{2}/g, '&#93;')
     226
    224227                                return '[caption id="' + id + '" align="' + align + '" width="' + width + '"' + classes + ']' + c + ' ' + caption + '[/caption]';
    225228                        });
    226229