Markdown Supported while </> Forbidden
This commit is contained in:
parent
8f648d6819
commit
6c6aab900b
|
@ -1659,6 +1659,11 @@ if (akina_option('sakura_widget')) {
|
||||||
// 评论Markdown解析
|
// 评论Markdown解析
|
||||||
function markdown_parser($incoming_comment) {
|
function markdown_parser($incoming_comment) {
|
||||||
global $wpdb,$comment_markdown_content;
|
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");
|
$myCustomer = $wpdb->get_row("SELECT * FROM wp_comments");
|
||||||
//Add column if not present.
|
//Add column if not present.
|
||||||
if (!isset($myCustomer->say_state)) {
|
if (!isset($myCustomer->say_state)) {
|
||||||
|
|
Loading…
Reference in New Issue