WordPress.org

Making WordPress.org

Changeset 2940


Ignore:
Timestamp:
04/12/2016 09:41:11 PM (4 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Fix display of summary containing special characters.

Fixes #1131.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php

    r2937 r2940  
    11331133
    11341134        if ( $summary ) {
    1135             add_filter( 'the_excerpt', 'htmlentities', 9 ); // Run before wpautop
     1135            // Fix https://developer.wordpress.org/reference/functions/get_extended/
     1136            // until the 'more' delimiter in summary is backticked.
     1137            $summary = str_replace( array( '<!--', '-->' ), array( '<code>&lt;!--', '--&gt;</code>' ), $summary );
     1138
    11361139            $summary = apply_filters( 'the_excerpt', apply_filters( 'get_the_excerpt', $summary ) );
    1137             remove_filter( 'the_excerpt', 'htmlentities', 9 );
    11381140        }
    11391141
Note: See TracChangeset for help on using the changeset viewer.