Make WordPress Core

Changeset 26440


Ignore:
Timestamp:
11/27/2013 10:31:04 PM (12 years ago)
Author:
westi
Message:

KSES: Extend support in wp_kses_normalize_entities to named entities with up to two numbers on the end of the name so as to support a wider list of valid entities.

Fixes â#26290

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/kses.php

    r25460 r26440  
    447447        'sdot',    'lceil',  'rceil',   'lfloor', 'rfloor', 'lang',
    448448        'rang',    'loz',    'spades',  'clubs',  'hearts', 'diams',
     449        'sup1',    'sup2',   'sup3',    'frac14', 'frac12', 'frac34',
     450        'there4',
    449451    );
    450452
     
    11201122    # Change back the allowed entities in our entity whitelist
    11211123
    1122     $string = preg_replace_callback('/&([A-Za-z]{2,8});/', 'wp_kses_named_entities', $string);
     1124    $string = preg_replace_callback('/&([A-Za-z]{2,8}[0-9]{0,2});/', 'wp_kses_named_entities', $string);
    11231125    $string = preg_replace_callback('/&#(0*[0-9]{1,7});/', 'wp_kses_normalize_entities2', $string);
    11241126    $string = preg_replace_callback('/&#[Xx](0*[0-9A-Fa-f]{1,6});/', 'wp_kses_normalize_entities3', $string);
Note: See TracChangeset for help on using the changeset viewer.