id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses 7988,wpautop p (paragraph) bug with div,filosofo,,"As [http://comox.textdrive.com/pipermail/wp-hackers/2008-October/022307.html Jan Erik Moström pointed out on wp-hackers], wpautop mis-parses the following line: {{{
}}} The problem is this line in wpautop: {{{$pee = preg_replace('!([^<]+)\s*?((?:div|address|form)[^>]*>)!', ""
$1
$2"", $pee);}}} This says that if a line has a {{{}}} tag, some non-markup stuff, perhaps some space, followed by a closing tag of {{{}}}, {{{}}}, or {{{}}}, then the {{{
}}} is orphaned and should add a closing tag ({{{
}}}) on the right of the non-markup stuff. The mistake that it makes is allowing it to enclose empty space in {{{}}}. It makes this mistake by allowing space characters to be considered as the non-markup stuff. My patch tells it not to do so by changing the above line to the following: {{{$pee = preg_replace('!([^<\s]+)\s*?((?:div|address|form)[^>]*>)!', ""
$1
$2"", $pee);}}} ",defect (bug),closed,normal,,Formatting,2.7,normal,wontfix,has-patch needs-testing needs-unit-tests,,