public static function convertQuotes($str)
    {

        $r = "/\[q(?:uote)?\](.*?)\[\/q(?:uote)?\]/is";
        while(preg_match($r, $str)){
            $str = preg_replace($r, '<blockquote class="quote"><p>\\1</p></blockquote>', $str);
        }

        return $str;
    }