Ticket #22625: balanceTags-23001-2.patch
| File balanceTags-23001-2.patch, 958 bytes (added by , 13 years ago) |
|---|
-
wp-includes/formatting.php
1181 1181 // WP bug fix for LOVE <3 (and other situations with '<' before a number) 1182 1182 $text = preg_replace('#<([0-9]{1})#', '<$1', $text); 1183 1183 1184 while ( preg_match("/<(\/?[\w:] *)\s*([^>]*)>/", $text, $regex) ) {1184 while ( preg_match("/<(\/?[\w:]+)\s*([^>]*)>/", $text, $regex) ) { 1185 1185 $newtext .= $tagqueue; 1186 1186 1187 1187 $i = strpos($text, $regex[0]); … … 1258 1258 $tag = ''; 1259 1259 } 1260 1260 } 1261 $newtext .= s ubstr($text, 0, $i) . $tag;1261 $newtext .= str_replace( '<', '<', substr($text, 0, $i)) . $tag; 1262 1262 $text = substr($text, $i + $l); 1263 1263 } 1264 1264 … … 1266 1266 $newtext .= $tagqueue; 1267 1267 1268 1268 // Add Remaining text 1269 $newtext .= $text;1269 $newtext .= str_replace( '<', '<', $text ); 1270 1270 1271 1271 // Empty Stack 1272 1272 while( $x = array_pop($tagstack) )