diff options
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]; |