Changeset 41443
- Timestamp:
- 09/19/2017 12:40:31 PM (7 years ago)
- Location:
- branches/4.0
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.0
-
branches/4.0/src/wp-includes/js/mce-view.js
r29649 r41443 129 129 130 130 if ( head || body.indexOf( '<script' ) !== -1 ) { 131 if ( body.indexOf( '[' ) !== -1 && body.indexOf( ']' ) !== -1 ) { 132 var shortcodesRegExp = new RegExp( '\\[\\/?(?:' + window.mceViewL10n.shortcodes.join( '|' ) + ')[^\\]]*?\\]', 'g' ); 133 // Escape tags inside shortcode previews. 134 body = body.replace( shortcodesRegExp, function( match ) { 135 return match.replace( /</g, '<' ).replace( />/g, '>' ); 136 } ); 137 } 138 131 139 this.getNodes( function ( editor, node, content ) { 132 140 var dom = editor.dom, -
branches/4.0/src/wp-includes/script-loader.php
r29689 r41443 703 703 ) ); 704 704 705 wp_localize_script( 'mce-view', 'mceViewL10n', array( 706 'shortcodes' => ! empty( $GLOBALS['shortcode_tags'] ) ? array_keys( $GLOBALS['shortcode_tags'] ) : array() 707 ) ); 705 708 } 706 709
Note: See TracChangeset
for help on using the changeset viewer.