Changeset 5783
- Timestamp:
- 07/06/2007 12:53:15 PM (18 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/default-filters.php
r5652 r5783 13 13 add_filter('the_excerpt', 'wptexturize'); 14 14 add_filter('bloginfo', 'wptexturize'); 15 add_filter('pre_kses', 'wp_pre_kses_less_than'); 15 16 16 17 // Comments, trackbacks, pingbacks -
trunk/wp-includes/formatting.php
r5734 r5783 1196 1196 } 1197 1197 1198 // Convert lone less than signs. KSES already converts lone greater than signs. 1199 function wp_pre_kses_less_than( $text ) { 1200 return preg_replace_callback('%<[^>]*?((?=<)|>|$)%', 'wp_pre_kses_less_than_callback', $text); 1201 } 1202 1203 function wp_pre_kses_less_than_callback( $matches ) { 1204 if ( false === strpos($matches[0], '>') ) 1205 return wp_specialchars($matches[0]); 1206 return $matches[0]; 1207 } 1208 1198 1209 ?> -
trunk/wp-includes/kses.php
r5700 r5783 231 231 $string = wp_kses_js_entities($string); 232 232 $string = wp_kses_normalize_entities($string); 233 $string = wp_kses_hook($string);234 233 $allowed_html_fixed = wp_kses_array_lc($allowed_html); 234 $string = wp_kses_hook($string, $allowed_html_fixed, $allowed_protocols); // WP changed the order of these funcs and added args to wp_kses_hook 235 235 return wp_kses_split($string, $allowed_html_fixed, $allowed_protocols); 236 236 } # function wp_kses 237 237 238 function wp_kses_hook($string )238 function wp_kses_hook($string, $allowed_html, $allowed_protocols) 239 239 ############################################################################### 240 240 # You add any kses hooks here. 241 241 ############################################################################### 242 242 { 243 $string = apply_filters( 'pre_kses', $string ); 243 244 return $string; 244 245 } # function wp_kses_hook
Note: See TracChangeset
for help on using the changeset viewer.