Changeset 41437 for branches/4.6
- Timestamp:
- 09/19/2017 12:40:14 PM (8 years ago)
- Location:
- branches/4.6
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
src/wp-includes/js/mce-view.js (modified) (3 diffs)
-
src/wp-includes/script-loader.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.6
-
branches/4.6/src/wp-includes/js/mce-view.js
r38158 r41437 156 156 instance; 157 157 158 text = tinymce.DOM.decode( text );159 160 158 if ( ! force ) { 161 159 instance = this.getInstance( text ); … … 423 421 var $viewNode; 424 422 425 if ( ! this.loader && $( node ).text() !== t his.text) {423 if ( ! this.loader && $( node ).text() !== tinymce.DOM.decode( this.text ) ) { 426 424 editor.dom.setAttrib( node, 'data-wpview-marker', null ); 427 425 return; … … 486 484 setIframes: function( head, body, callback, rendered ) { 487 485 var self = this; 486 487 if ( body.indexOf( '[' ) !== -1 && body.indexOf( ']' ) !== -1 ) { 488 var shortcodesRegExp = new RegExp( '\\[\\/?(?:' + window.mceViewL10n.shortcodes.join( '|' ) + ')[^\\]]*?\\]', 'g' ); 489 // Escape tags inside shortcode previews. 490 body = body.replace( shortcodesRegExp, function( match ) { 491 return match.replace( /</g, '<' ).replace( />/g, '>' ); 492 } ); 493 } 488 494 489 495 this.getNodes( function( editor, node ) { -
branches/4.6/src/wp-includes/script-loader.php
r38487 r41437 915 915 'blog_id' => get_current_blog_id(), 916 916 ) ); 917 918 wp_localize_script( 'mce-view', 'mceViewL10n', array( 919 'shortcodes' => ! empty( $GLOBALS['shortcode_tags'] ) ? array_keys( $GLOBALS['shortcode_tags'] ) : array() 920 ) ); 917 921 } 918 922
Note: See TracChangeset
for help on using the changeset viewer.