aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2017-05-23 00:32:11 +0200
committerKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2017-05-23 00:32:11 +0200
commit547df2219ab4b870256f2ed90e36b97d8bf200bf (patch)
tree3e990b35eb939911bb7949c2f5d633fa3d788faf /include
parent50e9d024581ddf57f37a6302bc089a88237657bb (diff)
downloadvolse-hubzilla-547df2219ab4b870256f2ed90e36b97d8bf200bf.tar.gz
volse-hubzilla-547df2219ab4b870256f2ed90e36b97d8bf200bf.tar.bz2
volse-hubzilla-547df2219ab4b870256f2ed90e36b97d8bf200bf.zip
Replace Mardownify library with html-to-markdown library.
Diffstat (limited to 'include')
-rw-r--r--include/markdown.php7
1 files changed, 3 insertions, 4 deletions
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('&lt;','&gt;','&amp;'),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.