Ticket #22625: balanceTags-25012.patch
| File balanceTags-25012.patch, 958 bytes (added by , 12 years ago) |
|---|
-
wp-includes/formatting.php
1208 1208 // WP bug fix for LOVE <3 (and other situations with '<' before a number) 1209 1209 $text = preg_replace('#<([0-9]{1})#', '<$1', $text); 1210 1210 1211 while ( preg_match("/<(\/?[\w:] *)\s*([^>]*)>/", $text, $regex) ) {1211 while ( preg_match("/<(\/?[\w:]+)\s*([^>]*)>/", $text, $regex) ) { 1212 1212 $newtext .= $tagqueue; 1213 1213 1214 1214 $i = strpos($text, $regex[0]); … … 1285 1285 $tag = ''; 1286 1286 } 1287 1287 } 1288 $newtext .= s ubstr($text, 0, $i) . $tag;1288 $newtext .= str_replace( '<', '<', substr($text, 0, $i)) . $tag; 1289 1289 $text = substr($text, $i + $l); 1290 1290 } 1291 1291 … … 1293 1293 $newtext .= $tagqueue; 1294 1294 1295 1295 // Add Remaining text 1296 $newtext .= $text;1296 $newtext .= str_replace( '<', '<', $text ); 1297 1297 1298 1298 // Empty Stack 1299 1299 while( $x = array_pop($tagstack) )