Filtering the Comment Form Allowed Tags

There’s a filter-hook that allows you to run some checking before comment is posted so you could use it too : add_filter(‘preprocess_comment’, ‘wpse_158147_check_new_comment’); function wpse_158147_check_new_comment($commentdata){ $commentdata[‘comment_content’] = preg_replace(“/<tag(.*?)>(.*)<\/tag>/”, “$2″, $commentdata[‘comment_content’]);// or str_replace return $commentdata; } Here “tag” would be stripped (to be replaced here with your specific tag).