* finish task #40312.

This commit is contained in:
wangyidong
2021-07-16 14:32:25 +08:00
parent 3f25c7db97
commit 5f2f502fc6
3 changed files with 27 additions and 25 deletions
+23
View File
@@ -2425,6 +2425,29 @@ EOD;
return $menu;
}
/**
* Process markdown.
*
* @param string $markdown
* @static
* @access public
* @return string
*/
static public function processMarkdown($markdown)
{
if(empty($markdown)) return false;
$markdown = str_replace('&', '&', $markdown);
global $app;
$hyperdown = $app->loadClass('hyperdown');
$content = $hyperdown->makeHtml($markdown);
$content = htmlspecialchars_decode($content);
$content = fixer::stripDataTags($content);
return $content;
}
}
class common extends commonModel