WordPress.org

Make WordPress Core

Ticket #16432: 16432-alt.diff

File 16432-alt.diff, 457 bytes (added by GaryJ, 3 years ago)

Add filter to allow plugin to short circuit the function

  • wp-includes/formatting.php

     
    18751875 * @return string Text with converted entities. 
    18761876 */ 
    18771877function ent2ncr($text) { 
     1878 
     1879        if( $filtered = apply_filters( 'ent2ncr', false, $text ) ) 
     1880                return $filtered; 
     1881 
    18781882        $to_ncr = array( 
    18791883                '"' => '"', 
    18801884                '&' => '&',