Make WordPress Core

Ticket #1290: functions-formatting.php.2.diff

File functions-formatting.php.2.diff, 734 bytes (added by Thiemo, 20 years ago)
Line 
16,7c6,7
2<       $textarr = preg_split("/(<.*>)/Us", $text, -1, PREG_SPLIT_DELIM_CAPTURE);
3<       $stop = count($textarr); $next = true; // loop stuff
4---
5>       $textarr = preg_split('/(<code.*<\/code>|<kbd.*<\/kbd>|<pre.*<\/pre>|<script.*<\/script>|<style.*<\/style>|<[^>]*>)/isU', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
6>       $stop = count($textarr); // loop stuff
711c11
8<               if (isset($curl{0}) && '<' != $curl{0} && $next) { // If it's not a tag
9---
10>               if (isset($curl{0}) && '<' != $curl{0}) { // If it's not a tag
1136,41d35
12<
13<               } elseif (strstr($curl, '<code') || strstr($curl, '<pre') || strstr($curl, '<kbd' || strstr($curl, '<style') || strstr($curl, '<script'))) {
14<                       // strstr is fast
15<                       $next = false;
16<               } else {
17<                       $next = true;