Make WordPress Core


Ignore:
Timestamp:
11/13/2005 02:48:35 AM (20 years ago)
Author:
matt
Message:

Account for more letter entities, fixes #1431

File:
1 edited

Legend:

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

    r3049 r3056  
    4242            $next = true;
    4343        }
    44         $curl = preg_replace('/&([^#])(?![a-z12]{1,8};)/', '&$1', $curl);
     44        $curl = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/', '&$1', $curl);
    4545        $output .= $curl;
    4646    }
     
    9999function wp_specialchars( $text, $quotes = 0 ) {
    100100    // Like htmlspecialchars except don't double-encode HTML entities
    101     $text = preg_replace('/&([^#])(?![a-z12]{1,8};)/', '&$1', $text);-
     101    $text = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/', '&$1', $text);-
    102102    $text = str_replace('<', '&lt;', $text);
    103103    $text = str_replace('>', '&gt;', $text);
     
    350350
    351351    // Converts lone & characters into &#38; (a.k.a. &amp;)
    352     $content = preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&#038;$1', $content);
     352    $content = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/i', '&#038;$1', $content);
    353353
    354354    // Fix Word pasting
Note: See TracChangeset for help on using the changeset viewer.