Code Duplication    Length = 7-8 lines in 2 locations

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

@@ 2578-2584 (lines=7) @@
2575
2576
    // replace style-attribute, first (if needed)
2577
    if (in_array('style', $this->_evil_attributes, true)) {
2578
      do {
2579
        $count = $temp_count = 0;
2580
2581
        $str = preg_replace('/(<[^>]+)(?<!\w)(style="(:?[^"]*?)"|style=\'(:?[^\']*?)\')/i', '$1' . $this->_replacement, $str, -1, $temp_count);
2582
        $count += $temp_count;
2583
2584
      } while ($count);
2585
    }
2586
2587
    do {
@@ 2587-2594 (lines=8) @@
2584
      } while ($count);
2585
    }
2586
2587
    do {
2588
      $count = $temp_count = 0;
2589
2590
      // find occurrences of illegal attribute strings with and without quotes (042 ["] and 047 ['] are octal quotes)
2591
      $str = preg_replace('/(<[^>]+)(?<!\w)(' . $evil_attributes_string . ')\s*=\s*(?:(?:"|\042|\'|\047)(?:[^\\2]*?)(?:\\2)|[^\s>]*)/is', '$1' . $this->_replacement, $str, -1, $temp_count);
2592
      $count += $temp_count;
2593
2594
    } while ($count);
2595
2596
    return (string)$str;
2597
  }