dimanche 5 février 2017

PHP League Commonmark returns HTML wrapped in quotes

I am using the PHP League Commonmark package in a Laravel application. Commonmark's convertToHtml() is returning html wrapped in double quotes. This content is, of course, rendered on the page with the html tags displayed. I am using a presenter to convert the md that is returned from my DB. I have confirmed that there are no quotes in the content in the db.

I have used the package before, and cannot find what I am doing wrong. Can anyone point me in the right direction?

Here is my presenter (the extended class is the Laracasts presenter):

class ContentPresenter extends Presenter
{
private $markdown;

public function bodyHtml()
{
    $this->markdown = new CommonMarkConverter();

    return $this->body ? $this->markdown->convertToHtml($this->body) : null;
}

}



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2kfx9t3
via IFTTT

Aucun commentaire:

Enregistrer un commentaire