diff options
author | Klaus Weidenbach <Klaus.Weidenbach@gmx.net> | 2017-02-25 19:12:41 +0100 |
---|---|---|
committer | Klaus Weidenbach <Klaus.Weidenbach@gmx.net> | 2017-02-27 23:40:29 +0100 |
commit | 503c368f9ec08a70e4dbacd7b729568da6e4ea92 (patch) | |
tree | 94222fe6380f9d7311a41c398d7ffd28594b15d6 /include/text.php | |
parent | 2848d1caaf48a33ab1fb9a0c7de534287107e57e (diff) | |
download | volse-hubzilla-503c368f9ec08a70e4dbacd7b729568da6e4ea92.tar.gz volse-hubzilla-503c368f9ec08a70e4dbacd7b729568da6e4ea92.tar.bz2 volse-hubzilla-503c368f9ec08a70e4dbacd7b729568da6e4ea92.zip |
:arrow_up: :hammer: Upgrade PHP Markdown library.
The current version throws deprecated warning with PHP7.1 and PHPUnit.
Upgrade the Markdown library to the current PHP Markdown Lib 1.7.0.
Used composer to manage this library.
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/text.php b/include/text.php index eb8147f9a..63248a0a6 100644 --- a/include/text.php +++ b/include/text.php @@ -3,8 +3,9 @@ * @file include/text.php */ -require_once("include/bbcode.php"); +use \Michelf\MarkdownExtra; +require_once("include/bbcode.php"); // random string, there are 86 characters max in text mode, 128 for hex // output is urlsafe @@ -1650,8 +1651,7 @@ function prepare_text($text, $content_type = 'text/bbcode', $cache = false) { break; case 'text/markdown': - require_once('library/markdown.php'); - $s = Markdown($text); + $s = MarkdownExtra::defaultTransform($text); break; case 'application/x-pdl'; @@ -2062,7 +2062,7 @@ function ids_to_array($arr,$idx = 'id') { $t = array(); if($arr) { foreach($arr as $x) { - if(array_key_exists($idx,$x) && strlen($x[$idx]) && (! in_array($x[$idx],$t))) { + if(array_key_exists($idx,$x) && strlen($x[$idx]) && (! in_array($x[$idx],$t))) { $t[] = $x[$idx]; } } @@ -2078,7 +2078,7 @@ function ids_to_querystr($arr,$idx = 'id',$quote = false) { if($arr) { foreach($arr as $x) { if(! in_array($x[$idx],$t)) { - if($quote) + if($quote) $t[] = "'" . dbesc($x[$idx]) . "'"; else $t[] = $x[$idx]; |