Markdown Supported while </> Forbidden

pull/135/head
spirit 2019-11-17 17:05:24 +08:00
parent 8f648d6819
commit 6c6aab900b
1 changed files with 5 additions and 0 deletions

View File

@ -1659,6 +1659,11 @@ if (akina_option('sakura_widget')) {
// 评论Markdown解析
function markdown_parser($incoming_comment) {
global $wpdb,$comment_markdown_content;
$re = '/```([\s\S]*?)```[\s]*|`{1,2}[^`](.*?)`{1,2}|\[.*?\]\([\s\S]*?\)/m';
if(preg_replace($re,'temp',$incoming_comment['comment_content']) != strip_tags(preg_replace($re,'temp',$incoming_comment['comment_content']))){
siren_ajax_comment_err('评论只支持Markdown啦见谅╮( ̄▽ ̄)╭<br>Markdown Supported while <i class="fa fa-code" aria-hidden="true"></i> Forbidden');
return( $incoming_comment );
}
$myCustomer = $wpdb->get_row("SELECT * FROM wp_comments");
//Add column if not present.
if (!isset($myCustomer->say_state)) {