Code Duplication    Length = 9-10 lines in 2 locations

includes/libraries/protect/AntiXSS/UTF8.php 2 locations

@@ 5740-5749 (lines=10) @@
5737
      return false;
5738
    }
5739
5740
    if (
5741
        $cleanUtf8 === true
5742
        ||
5743
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5744
    ) {
5745
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5746
5747
      $needle = self::clean($needle);
5748
      $haystack = self::clean($haystack);
5749
    }
5750
5751
    if (
5752
        $encoding === 'UTF-8'
@@ 5824-5832 (lines=9) @@
5821
      return false;
5822
    }
5823
5824
    if (
5825
        $cleanUtf8 === true
5826
        ||
5827
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5828
    ) {
5829
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5830
      $needle = self::clean($needle);
5831
      $haystack = self::clean($haystack);
5832
    }
5833
5834
    if (
5835
        $encoding === 'UTF-8'