Changeset 41440 for branches/4.3
- Timestamp:
- 09/19/2017 12:40:22 PM (7 years ago)
- Location:
- branches/4.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.3
-
branches/4.3/src/wp-includes/js/mce-view.js
r33484 r41440 156 156 instance; 157 157 158 text = tinymce.DOM.decode( text );159 160 158 if ( ! force ) { 161 159 instance = this.getInstance( text ); … … 425 423 $viewNode; 426 424 427 if ( ! this.loader && $( node ).text() !== t his.text) {425 if ( ! this.loader && $( node ).text() !== tinymce.DOM.decode( this.text ) ) { 428 426 editor.dom.setAttrib( node, 'data-wpview-marker', null ); 429 427 return; … … 496 494 var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver, 497 495 self = this; 496 497 if ( body.indexOf( '[' ) !== -1 && body.indexOf( ']' ) !== -1 ) { 498 var shortcodesRegExp = new RegExp( '\\[\\/?(?:' + window.mceViewL10n.shortcodes.join( '|' ) + ')[^\\]]*?\\]', 'g' ); 499 // Escape tags inside shortcode previews. 500 body = body.replace( shortcodesRegExp, function( match ) { 501 return match.replace( /</g, '<' ).replace( />/g, '>' ); 502 } ); 503 } 498 504 499 505 this.getNodes( function( editor, node, contentNode ) { -
branches/4.3/src/wp-includes/script-loader.php
r37374 r41440 792 792 ) ); 793 793 794 wp_localize_script( 'mce-view', 'mceViewL10n', array( 795 'shortcodes' => ! empty( $GLOBALS['shortcode_tags'] ) ? array_keys( $GLOBALS['shortcode_tags'] ) : array() 796 ) ); 794 797 } 795 798
Note: See TracChangeset
for help on using the changeset viewer.