aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-05-23 16:14:41 -0700
committerzotlabs <mike@macgirvin.com>2017-05-23 16:14:41 -0700
commitbf580fcc0651663031d74072ee17a8f6becb49fc (patch)
treeaaf0ac6129053c728f29559381f521395494f0b8 /include
parent357e7af6adb303aa12f6506585e7d59a1250da99 (diff)
parent31d920817264552cece5a57c2390411af4d7a3a1 (diff)
downloadvolse-hubzilla-bf580fcc0651663031d74072ee17a8f6becb49fc.tar.gz
volse-hubzilla-bf580fcc0651663031d74072ee17a8f6becb49fc.tar.bz2
volse-hubzilla-bf580fcc0651663031d74072ee17a8f6becb49fc.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'include')
-rw-r--r--include/markdown.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/markdown.php b/include/markdown.php
index 5826cb089..a20c0d8ba 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");
@@ -177,10 +177,12 @@ function bb_to_markdown($Text) {
$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);
- // The converter adds backslashes to our attempt at getting around the html entity preservation for some weird reason.
+ $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.
+
$Text = str_replace(array('&\\_lt\\_;','&\\_gt\\_;','&\\_amp\\_;'),array('&lt;','&gt;','&amp;'),$Text);