src/includes/classes/Core/Utils/WebPurify.php
public function checkSlug(string $slug, array $args = []): bool
    {
        $text = mb_strtolower($slug);
        $text = preg_replace('/[^\p{L}\p{N}]/ui', ' ', $text);
        $text = preg_replace('/\s+/u', ' ', $text);

        return $this->check($text, $args);
    }
public function checkSlug(string $slug, array $args = []): bool
    {
        $text = mb_strtolower($slug);
        $text = preg_replace('/[^\p{L}\p{N}]/ui', ' ', $text);
        $text = preg_replace('/\s+/u', ' ', $text);

        return $this->check($text, $args);
    }
Check a slug for bad words.

@since 150424 Badwords checker.

@param string $slug Input slug to check.
@param array  $args Any additional args.

@return bool True if slug contains bad words.