protected function formatBody($value, array $doc)
    {
        $value = $this->convertEncoding($value);

        // Replace html titles
        $value = mb_ereg_replace('<h[1-5].*?>(.*?)</h[1-5]>', "<h3>\\1</h3>", $value);

        // Strip jump tags
        $value = str_replace('[jump]', '<!-- [jump] -->', $value);

        // Fix spaces in <a> elements
        $value = mb_ereg_replace('<a\shref="\s+', '<a href="', $value, 'i');

        // Remove empty p tags
        $value = mb_ereg_replace('<p[^>]*>[\s|&nbsp;]*<\/p>', '', $value, 'ims');

        // Replace '--' with em dash
        $value = $this->replaceEmDash($value);

        // Handle oembeds
        $value = $this->transformOEmbeds($value);

        // Trim
        return trim($value);
    }