$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>categories - category_description() shows raw html after version 3.x?|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

categories - category_description() shows raw html after version 3.x?

matteradmin9PV0评论

Just looking for some history on the output of category_description()

I have categories whose "description" fields are formatted with rich text and I'm trying to understand the differences in WP version with respect to the output of this method so that I can do a version check if necessary to implement desired output.

For example, before 3.0.1, it appears that category_description() returned the output stripped of any html markup. However, with the current 3.3.1 release, the output appears to be raw.

Just looking for some history on the output of category_description()

I have categories whose "description" fields are formatted with rich text and I'm trying to understand the differences in WP version with respect to the output of this method so that I can do a version check if necessary to implement desired output.

For example, before 3.0.1, it appears that category_description() returned the output stripped of any html markup. However, with the current 3.3.1 release, the output appears to be raw.

Share Improve this question edited Feb 9, 2019 at 0:04 fuxia 107k39 gold badges255 silver badges461 bronze badges asked Feb 6, 2012 at 16:22 N2MysticN2Mystic 3,1937 gold badges47 silver badges72 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

Actually HTML is stripped on input, using wp_filter_kses function hooked into pre_term_description filter. So if this hook isn't removed HTML would be stripped.

Post a comment

comment list (0)

  1. No comments so far