Code Duplication    Length = 3-4 lines in 3 locations

core/src/Legacy/Modifiers.php 3 locations

@@ 565-568 (lines=4) @@
562
                } else {
563
                    $params = '';
564
                }
565
                if (!strpos($params, '<br>') === false) {
566
                    $value = preg_replace('@(<br[ /]*>)\n@', '$1', $value);
567
                    $value = preg_replace('@<br[ /]*>@', "\n", $value);
568
                }
569
570
                return $this->strip_tags($value, $params);
571
            case 'urlencode':
@@ 1597-1599 (lines=3) @@
1594
    {
1595
        $modx = evolutionCMS();
1596
1597
        if (stripos($params, 'style') === false && stripos($value, '</style>') !== false) {
1598
            $value = preg_replace('@<style.*?>.*?</style>@is', '', $value);
1599
        }
1600
        if (stripos($params, 'script') === false && stripos($value, '</script>') !== false) {
1601
            $value = preg_replace('@<script.*?>.*?</script>@is', '', $value);
1602
        }
@@ 1600-1602 (lines=3) @@
1597
        if (stripos($params, 'style') === false && stripos($value, '</style>') !== false) {
1598
            $value = preg_replace('@<style.*?>.*?</style>@is', '', $value);
1599
        }
1600
        if (stripos($params, 'script') === false && stripos($value, '</script>') !== false) {
1601
            $value = preg_replace('@<script.*?>.*?</script>@is', '', $value);
1602
        }
1603
1604
        return trim(strip_tags($value, $params));
1605
    }