@@ -556,8 +556,7 @@ |
||
| 556 | 556 | $collecteurLiens = $collecteurModeles = null; |
| 557 | 557 | if (!empty($options['expanser_liens'])) { |
| 558 | 558 | $texte = expanser_liens($texte, $env['connect'] ?? '', $env['env'] ?? []); |
| 559 | - } |
|
| 560 | - else { |
|
| 559 | + } else { |
|
| 561 | 560 | $collecteurLiens = new CollecteurLiens(); |
| 562 | 561 | $texte = $collecteurLiens->echapper($texte, ['sanitize_callback' => 'safehtml']); |
| 563 | 562 | |
@@ -79,8 +79,7 @@ discard block |
||
| 79 | 79 | $tag['innerHtml'] = ''; |
| 80 | 80 | $tag['attributs'] = trim(substr($tag['opening'], strlen($this->tag) + 1, -2)); |
| 81 | 81 | $tags[] = $tag; |
| 82 | - } |
|
| 83 | - else { |
|
| 82 | + } else { |
|
| 84 | 83 | // enlever les closing qui sont avant le premier opening, car ils n'ont pas de sens |
| 85 | 84 | while ( |
| 86 | 85 | !empty($closing) |
@@ -99,8 +98,7 @@ discard block |
||
| 99 | 98 | array_shift($opening); |
| 100 | 99 | $next_opening = reset($opening); |
| 101 | 100 | } |
| 102 | - } |
|
| 103 | - else { |
|
| 101 | + } else { |
|
| 104 | 102 | while ($next_opening && $next_closing && $next_opening['pos'] < $next_closing['pos']) { |
| 105 | 103 | while ($next_opening && $next_opening['pos'] < $next_closing['pos']) { |
| 106 | 104 | // si pas self closing, il faut un closing de plus |
@@ -126,8 +124,7 @@ discard block |
||
| 126 | 124 | $tag['innerHtml'] = ''; |
| 127 | 125 | $tag['attributs'] = trim(substr($tag['opening'], strlen($this->tag) + 1, -1)); |
| 128 | 126 | $tags[] = $tag; |
| 129 | - } |
|
| 130 | - else { |
|
| 127 | + } else { |
|
| 131 | 128 | $tag = $first_opening; |
| 132 | 129 | $next_closing = array_shift($closing); |
| 133 | 130 | $innerHtml = substr($texte, $tag['pos'] + $tag['length'], $next_closing['pos'] - $tag['pos'] - $tag['length']); |