@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | return iterator_to_array($this->generateResults($matches)); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - return preg_replace_callback("/$regex/", function ($match) use ($callback) { |
|
| 34 | + return preg_replace_callback("/$regex/", function($match) use ($callback) { |
|
| 35 | 35 | if ($match[1] == '[' && $match[6] == ']') { |
| 36 | 36 | return substr($match[0], 1, -1); |
| 37 | 37 | } |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | .'\\[\\/\\2\\]' // Closing shortcode tag |
| 83 | 83 | .')?' |
| 84 | 84 | .')' |
| 85 | - .'(\\]?)'; // 6: Optional second closing brocket for escaping shortcodes: [[tag]] |
|
| 85 | + .'(\\]?)'; // 6: Optional second closing brocket for escaping shortcodes: [[tag]] |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | /** |
@@ -105,12 +105,12 @@ discard block |
||
| 105 | 105 | ]); |
| 106 | 106 | $pattern = "/{$patterns}/"; |
| 107 | 107 | $text = preg_replace("/[\x{00a0}\x{200b}]+/u", ' ', $text); |
| 108 | - if (preg_match_all($pattern, (string) $text, $match, PREG_SET_ORDER)) { |
|
| 108 | + if (preg_match_all($pattern, (string)$text, $match, PREG_SET_ORDER)) { |
|
| 109 | 109 | |
| 110 | 110 | // Reject any unclosed HTML elements |
| 111 | 111 | foreach ($this->generateAttributes($match) as $att => $value) { |
| 112 | - if ($value !== true && strpos((string) $value, '<') !== false) { |
|
| 113 | - if (preg_match('/^[^<]*+(?:<[^>]*+>[^<]*+)*+$/', (string) $value) !== 1) { |
|
| 112 | + if ($value !== true && strpos((string)$value, '<') !== false) { |
|
| 113 | + if (preg_match('/^[^<]*+(?:<[^>]*+>[^<]*+)*+$/', (string)$value) !== 1) { |
|
| 114 | 114 | $value = ''; |
| 115 | 115 | } |
| 116 | 116 | } |