Changeset 3056

Show
Ignore:
Timestamp:
11/13/05 02:48:35 (3 years ago)
Author:
matt
Message:

Account for more letter entities, fixes #1431

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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