WordPress.org

Make WordPress Core

Changeset 4167


Ignore:
Timestamp:
09/07/06 00:33:05 (8 years ago)
Author:
ryan
Message:

Recognize paragraph tags with attributes when stripping breaks. Props rockinfree. fixes #1706

File:
1 edited

Legend:

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

    r4148 r4167  
    7777    } 
    7878    $pee = preg_replace('!(</?(?:table|thead|tfoot|caption|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|p|h[1-6])[^>]*>)\s*<br />!', "$1", $pee); 
    79     $pee = preg_replace('!<br />(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)!', '$1', $pee); 
     79    $pee = preg_replace('!<br />(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee); 
    8080    $pee = preg_replace('!(<pre.*?>)(.*?)</pre>!ise', " stripslashes('$1') .  stripslashes(clean_pre('$2'))  . '</pre>' ", $pee); 
    8181 
Note: See TracChangeset for help on using the changeset viewer.