aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-01 09:54:01 +1100
committerGitHub <noreply@github.com>2017-03-01 09:54:01 +1100
commitfa02f3a1089975319df5a223c730f0f0249fd4bb (patch)
tree881bb6a3ccba460503d83fb84ed26eb210070cf0 /include/text.php
parent360397b2ed849521638428a51b1bb1d68389ad4a (diff)
parent503c368f9ec08a70e4dbacd7b729568da6e4ea92 (diff)
downloadvolse-hubzilla-fa02f3a1089975319df5a223c730f0f0249fd4bb.tar.gz
volse-hubzilla-fa02f3a1089975319df5a223c730f0f0249fd4bb.tar.bz2
volse-hubzilla-fa02f3a1089975319df5a223c730f0f0249fd4bb.zip
Merge pull request #686 from dawnbreak/markdown
Upgrade PHP Markdown library.
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php10
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];