1 | 6,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 |
---|
7 | 11c11 |
---|
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 |
---|
11 | 36,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; |
---|