@@ -22,10 +22,11 @@ |
||
| 22 | 22 | $this->text = preg_replace_callback('%\[url\s*=\s*("(?:[^"]*")|\A[^\']*\Z|(?:[^\'">\]\s]+))\s*(?:[^]\s]*)\]([\W\D\w\s]*?)\[/url\]%iu', |
| 23 | 23 | |
| 24 | 24 | function ($matches) { |
| 25 | - if (isset($matches[1]) && isset($matches[2])) |
|
| 26 | - return "<".$matches[1]."|".$matches[2].">"; |
|
| 27 | - else |
|
| 28 | - throw new \RuntimeException(sprintf("Text identified by '%d' has malformed BBCode urls", $this->id)); |
|
| 25 | + if (isset($matches[1]) && isset($matches[2])) { |
|
| 26 | + return "<".$matches[1]."|".$matches[2].">"; |
|
| 27 | + } else { |
|
| 28 | + throw new \RuntimeException(sprintf("Text identified by '%d' has malformed BBCode urls", $this->id)); |
|
| 29 | + } |
|
| 29 | 30 | }, |
| 30 | 31 | |
| 31 | 32 | $this->text |