Changeset 12125
- Timestamp:
- 10/29/2009 05:15:58 PM (15 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/default-filters.php
r12120 r12125 27 27 } 28 28 29 // Kses only for textarea saves and displays30 foreach ( array( 'pre_term_description', ' term_description', 'pre_link_description', 'link_description', 'pre_link_notes', 'link_notes', 'pre_user_description', 'user_description' ) as $filter ) {29 // Kses only for textarea saves 30 foreach ( array( 'pre_term_description', 'pre_link_description', 'pre_link_notes', 'pre_user_description' ) as $filter ) { 31 31 add_filter( $filter, 'wp_filter_kses' ); 32 } 33 34 // Kses only for textarea saves displays 35 foreach ( array( 'term_description', 'link_description', 'link_notes', 'user_description' ) as $filter ) { 36 add_filter( $filter, 'wp_kses_data' ); 32 37 } 33 38 -
trunk/wp-includes/kses.php
r11930 r12125 1060 1060 * @uses $allowedtags 1061 1061 * 1062 * @param string $data Content to filter 1062 * @param string $data Content to filter, expected to be escaped with slashes 1063 1063 * @return string Filtered content 1064 1064 */ … … 1069 1069 1070 1070 /** 1071 * Sanitize content with allowed HTML Kses rules. 1072 * 1073 * @since 2.9.0 1074 * @uses $allowedtags 1075 * 1076 * @param string $data Content to filter, expected to not be escaped 1077 * @return string Filtered content 1078 */ 1079 function wp_kses_data($data) { 1080 global $allowedtags; 1081 return wp_kses( $data , $allowedtags ); 1082 } 1083 1084 /** 1071 1085 * Sanitize content for allowed HTML tags for post content. 1072 1086 * … … 1077 1091 * @uses $allowedposttags 1078 1092 * 1079 * @param string $data Post content to filter 1093 * @param string $data Post content to filter, expected to be escaped with slashes 1080 1094 * @return string Filtered post content with allowed HTML tags and attributes intact. 1081 1095 */ … … 1083 1097 global $allowedposttags; 1084 1098 return addslashes ( wp_kses(stripslashes( $data ), $allowedposttags) ); 1099 } 1100 1101 /** 1102 * Sanitize content for allowed HTML tags for post content. 1103 * 1104 * Post content refers to the page contents of the 'post' type and not $_POST 1105 * data from forms. 1106 * 1107 * @since 2.9.0 1108 * @uses $allowedposttags 1109 * 1110 * @param string $data Post content to filter 1111 * @return string Filtered post content with allowed HTML tags and attributes intact. 1112 */ 1113 function wp_kses_post($data) { 1114 global $allowedposttags; 1115 return wp_kses( $data , $allowedposttags ); 1085 1116 } 1086 1117
Note: See TracChangeset
for help on using the changeset viewer.