Make WordPress Core

Ticket #31190: 31190.diff

File 31190.diff, 882 bytes (added by collinsinternet, 10 years ago)

Adds & to wp_specialchars_decode() to allow unit tests to pass.

  • src/wp-includes/formatting.php

     
    684684        $single_preg = array( '/&#0*39;/'  => ''', '/&#x0*27;/i' => ''' );
    685685        $double = array( '"' => '"', '"'  => '"', '"' => '"' );
    686686        $double_preg = array( '/&#0*34;/'  => '"', '/&#x0*22;/i' => '"' );
    687         $others = array( '&lt;'   => '<', '&#060;'  => '<', '&gt;'   => '>', '&#062;'  => '>', '&amp;'  => '&', '&#038;'  => '&', '&#x26;' => '&' );
     687        $others = array( '&lt;'   => '<', '&#060;'  => '<', '&gt;'   => '>', '&#062;'  => '>', '&amp;'  => '&', '&#038;'  => '&', '&#x26;' => '&', '&amp;' => '&amp;' );
    688688        $others_preg = array( '/&#0*60;/'  => '&#060;', '/&#0*62;/'  => '&#062;', '/&#0*38;/'  => '&#038;', '/&#x0*26;/i' => '&#x26;' );
    689689
    690690        if ( $quote_style === ENT_QUOTES ) {