WordPress.org

Make WordPress Core

Changeset 4451


Ignore:
Timestamp:
11/08/2006 01:12:41 AM (12 years ago)
Author:
ryan
Message:

Fix amp handling. Props skeltoac. fixes #3328

File:
1 edited

Legend:

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

    r4387 r4451  
    110110function wp_specialchars( $text, $quotes = 0 ) {
    111111    // Like htmlspecialchars except don't double-encode HTML entities
    112     $text = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/', '&$1', $text);
     112    $text = str_replace('&&', '&&', $text);
     113    $text = str_replace('&&', '&&', $text);
     114    $text = preg_replace('/&(?:$|([^#])(?![a-z1-4]{1,8};))/', '&$1', $text);
    113115    $text = str_replace('<', '&lt;', $text);
    114116    $text = str_replace('>', '&gt;', $text);
Note: See TracChangeset for help on using the changeset viewer.