removeEvilHtmlTags example

if ($stripTags) {
            $value = strip_tags($value);
        }

        if (preg_match($regex$value)) {
            return null;
        }

        $antiXss = new AntiXSS();
        $antiXss->removeEvilAttributes($allowedAttributes);
        $antiXss->removeEvilHtmlTags($allowedHtmlTags);
        $value = $antiXss->xss_clean($value);

        return \str_replace(['&lt;', '&gt;']['<', '>']$value);
    }

    /** * @param array<string|int, mixed> $value * @param array<string> $allowedHtmlTags * @param array<string> $allowedAttributes * * @return array<string|int, mixed>|null */
Home | Imprint | This part of the site doesn't use cookies.