Changeset 8298 for trunk/wp-includes/formatting.php
- Timestamp:
- 07/09/2008 04:52:27 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r8290 r8298 4 4 global $wp_cockneyreplace; 5 5 $next = true; 6 $has_pre_parent = false; 6 7 $output = ''; 7 8 $curl = ''; … … 27 28 $curl = $textarr[$i]; 28 29 29 if (isset($curl{0}) && '<' != $curl{0} && '[' != $curl{0} && $next ) { // If it's not a tag30 if (isset($curl{0}) && '<' != $curl{0} && '[' != $curl{0} && $next && !$has_pre_parent) { // If it's not a tag 30 31 // static strings 31 32 $curl = str_replace($static_characters, $static_replacements, $curl); 32 33 // regular expressions 33 34 $curl = preg_replace($dynamic_characters, $dynamic_replacements, $curl); 34 } elseif (strpos($curl, '<code') !== false || strpos($curl, '< pre') !== false || strpos($curl, '<kbd') !== false || strpos($curl, '<style') !== false || strpos($curl, '<script') !== false) {35 } elseif (strpos($curl, '<code') !== false || strpos($curl, '<kbd') !== false || strpos($curl, '<style') !== false || strpos($curl, '<script') !== false) { 35 36 $next = false; 37 } elseif (strpos($curl, '<pre') !== false) { 38 $has_pre_parent = true; 39 } elseif (strpos($curl, '</pre>') !== false) { 40 $has_pre_parent = false; 36 41 } else { 37 42 $next = true;
Note: See TracChangeset
for help on using the changeset viewer.