fix: remove the function sanitize_theme #447
This commit is contained in:
parent
59c0a9e658
commit
0c1a624188
|
@ -923,7 +923,10 @@ abstract class Repository {
|
|||
return $content;
|
||||
}
|
||||
|
||||
return sanitize_theme($content);
|
||||
$allowed_html = wp_kses_allowed_html('post');
|
||||
unset($allowed_html["a"]);
|
||||
|
||||
return trim(wp_kses($content, $allowed_html));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -39,16 +39,4 @@ add_action('init', ['Tainacan\Migrations', 'run_migrations']);
|
|||
//https://core.trac.wordpress.org/ticket/23022#comment:13
|
||||
add_filter( 'wp_untrash_post_status', function( $new_status, $post_id, $previous_status ) {
|
||||
return $previous_status;
|
||||
}, 10, 3 );
|
||||
|
||||
add_action('the_post', function($post){
|
||||
$post->post_content = sanitize_theme($post->post_content);
|
||||
$post->post_title = sanitize_theme($post->post_title);
|
||||
}, 10, 2);
|
||||
|
||||
function sanitize_theme($content) {
|
||||
$allowed_html = wp_kses_allowed_html('post');
|
||||
unset($allowed_html["a"]);
|
||||
|
||||
return trim(wp_kses($content, $allowed_html));
|
||||
}
|
||||
}, 10, 3 );
|
Loading…
Reference in New Issue