add some useful html tag to markdown whitelist

This commit is contained in:
joyqi
2017-01-25 12:12:25 +08:00
parent b9dc6a61ad
commit f2ebf4b10a
3 changed files with 18 additions and 1 deletions
+8
View File
@@ -27,6 +27,14 @@ class Markdown
self::$parser = new HyperDown();
self::$parser->hook('afterParseCode', array('Markdown', 'transerCodeClass'));
self::$parser->hook('beforeParseInline', array('Markdown', 'transerComment'));
self::$parser->_commonWhiteList .= '|img|cite|embed|iframe';
self::$parser->_specialWhiteList = array_merge(self::$parser->_specialWhiteList, array(
'ol' => 'ol|li',
'ul' => 'ul|li',
'blockquote' => 'blockquote',
'pre' => 'pre|code'
));
}
return self::$parser->makeHtml($text);