Changeset 8803
- Timestamp:
- 05/16/2019 11:15:28 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/import-block-editor.php
r8790 r8803 18 18 add_filter( 'wporg_markdown_after_transform', array( $this, 'wporg_markdown_after_transform' ), 10, 2 ); 19 19 20 add_filter( ' the_content', array( $this, 'fix_code_entity_encoding' ), 6);20 add_filter( 'syntaxhighlighter_htmlresult', array( $this, 'fix_code_entity_encoding' ) ); 21 21 22 22 add_action( 'pre_post_update', function( $post_id, $data ) { … … 73 73 } 74 74 75 if ( false !== mb_strpos( $content, ' [code' ) ) {75 if ( false !== mb_strpos( $content, '&' ) ) { 76 76 $content = preg_replace_callback( 77 '|( \[code[^\]]*\])(.+)(\[\/code\])|Us',77 '|(<pre class="brush[^>]+)(.+)(</pre)|Us', 78 78 function( $matches ) { 79 79 return $matches[1] . html_entity_decode( $matches[2], ENT_QUOTES | ENT_HTML401 ) . $matches[3];
Note: See TracChangeset
for help on using the changeset viewer.