Changeset 13468 for trunk/wp-includes/formatting.php
- Timestamp:
- 02/27/2010 08:06:35 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/formatting.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r13382 r13468 843 843 * 844 844 * @param string $class The classname to be sanitized 845 * @param string $fallback The value to return if the sanitization end's up as an empty string. 845 * @param string $fallback Optional. The value to return if the sanitization end's up as an empty string. 846 * Defaults to an empty string. 846 847 * @return string The sanitized value 847 848 */ 848 function sanitize_html_class( $class, $fallback){849 function sanitize_html_class( $class, $fallback = '' ) { 849 850 //Strip out any % encoded octets 850 851 $sanitized = preg_replace('|%[a-fA-F0-9][a-fA-F0-9]|', '', $class); … … 853 854 $sanitized = preg_replace('/[^A-Za-z0-9-]/', '', $sanitized); 854 855 855 if ( '' == $sanitized)856 if ( '' == $sanitized ) 856 857 $sanitized = $fallback; 857 858 858 return apply_filters( 'sanitize_html_class',$sanitized, $class, $fallback);859 return apply_filters( 'sanitize_html_class', $sanitized, $class, $fallback ); 859 860 } 860 861
Note: See TracChangeset
for help on using the changeset viewer.