15 | | // Strip, trim, kses, special chars for string saves |
16 | | $filters = array('pre_term_name', 'pre_comment_author_name', 'pre_link_name', 'pre_link_target', |
| 15 | // Strip, trim, kses, special chars for string saves, converting lone less than sign to < (rescuing from strip_tags) |
| 16 | $filters = array('pre_term_name'); |
| 17 | foreach ( $filters as $filter ) { |
| 18 | add_filter($filter, 'trim'); |
| 19 | add_filter($filter, 'wp_pre_kses_less_than'); |
| 20 | add_filter($filter, 'strip_tags'); |
| 21 | add_filter($filter, 'wp_filter_kses'); |
| 22 | add_filter($filter, 'wp_specialchars', 30); |
| 23 | } |
| 24 | |
| 25 | // Strip, trim, kses, special chars for string saves, without converting less than sign (where invalid or undesirable) |
| 26 | $filters = array('pre_comment_author_name', 'pre_link_name', 'pre_link_target', |