From 547df2219ab4b870256f2ed90e36b97d8bf200bf Mon Sep 17 00:00:00 2001 From: Klaus Weidenbach Date: Tue, 23 May 2017 00:32:11 +0200 Subject: Replace Mardownify library with html-to-markdown library. --- include/markdown.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/markdown.php b/include/markdown.php index a9617f72b..39569a0f6 100644 --- a/include/markdown.php +++ b/include/markdown.php @@ -5,7 +5,7 @@ */ use Michelf\MarkdownExtra; -use Markdownify\Converter; +use League\HTMLToMarkdown\HtmlConverter; require_once("include/oembed.php"); require_once("include/event.php"); @@ -495,9 +495,8 @@ function bb2diaspora($Text, $preserve_nl = false, $fordiaspora = true) { $Text = str_replace(array('<','>','&'),array('&_lt_;','&_gt_;','&_amp_;'),$Text); // Now convert HTML to Markdown - $md = new Converter(Converter::LINK_AFTER_CONTENT, false, false); - $Text = $md->parseString($Text); - + $md = new HtmlConverter(); + $Text = $md->convert($Text); // It also adds backslashes to our attempt at getting around the html entity preservation for some weird reason. -- cgit v1.2.3