diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 78094ae4..5578f462 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -17,9 +17,3 @@ parameters: identifier: function.alreadyNarrowedType count: 1 path: src/OutputFilter.php - - - - message: '#^Method Joomla\\Filter\\OutputFilter\:\:cleanText\(\) never assigns null to &\$text so it can be removed from the by\-ref type\.$#' - identifier: parameterByRef.unusedType - count: 1 - path: src/OutputFilter.php diff --git a/src/InputFilter.php b/src/InputFilter.php index ed60b0cc..f8aedf61 100644 --- a/src/InputFilter.php +++ b/src/InputFilter.php @@ -382,13 +382,13 @@ protected function cleanTags($source) } /* - * Exclude all "non-regular" tagnames - * OR no tagname + * No tagname + * OR exclude all "non-regular" tagnames * OR remove if xssauto is on and tag is blocked */ if ( - (!preg_match('/^[a-z][a-z0-9]*$/i', $tagName)) - || (!$tagName) + (!$tagName) + || (!preg_match('/^[a-z][a-z0-9]*$/i', $tagName)) || ((\in_array(strtolower($tagName), $this->blockedTags)) && $this->xssAuto) ) { $postTag = substr($postTag, ($tagLength + 2));