Make WordPress Core

Changeset 11338


Ignore:
Timestamp:
05/15/2009 06:29:19 AM (15 years ago)
Author:
westi
Message:

Ensure that wp_specialchars captures all pre-encoded entities correctly when preventing double encoding. Fixes #9821.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r11313 r11338  
    241241        $quote_style = ENT_NOQUOTES;
    242242    }
    243 
     243   
    244244    // Handle double encoding ourselves
    245245    if ( !$double_encode ) {
    246246        $string = wp_specialchars_decode( $string, $_quote_style );
    247         $string = preg_replace( '/&(#?x?[0-9]+|[a-z]+);/i', '|wp_entity|$1|/wp_entity|', $string );
     247        $string = preg_replace( '/&(#?x?[0-9a-z]+);/i', '|wp_entity|$1|/wp_entity|', $string );
    248248    }
    249249
Note: See TracChangeset for help on using the changeset viewer.