public static function cleanContent($content)
    {
        $content = self::stripControlCharacters($content);
        // remove Javascript
        $content = preg_replace('@<script[^>]*>.*?<\/script>@msi', '', $content);

        // remove internal CSS styles
        $content = preg_replace('@<style[^>]*>.*?<\/style>@msi', '', $content);

        // prevents concatenated words when stripping tags afterwards
        $content = str_replace(['<', '>'], [' <', '> '], $content);
        $content = static::stripTags($content);

        $content = str_replace(["\t", "\n", "\r", '&nbsp;'], ' ', $content);
        $content = self::stripUnicodeRanges($content);
        $content = preg_replace('/\s{2,}/', ' ', $content);
        $content = trim($content);

        return $content;
    }