Changeset 15929 for trunk/wp-includes/formatting.php
- Timestamp:
- 10/23/2010 12:55:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r15816 r15929 629 629 chr(197).chr(188) => 'z', chr(197).chr(189) => 'Z', 630 630 chr(197).chr(190) => 'z', chr(197).chr(191) => 's', 631 chr(200).chr(153) => 's', chr(200).chr(155) => 't', 631 632 // Euro Sign 632 633 chr(226).chr(130).chr(172) => 'E', … … 784 785 * @param string $title The string to be sanitized. 785 786 * @param string $fallback_title Optional. A title to use if $title is empty. 787 * @param string $context Optional. The operation for which the string is sanitized 786 788 * @return string The sanitized string. 787 789 */ 788 function sanitize_title($title, $fallback_title = '' ) {790 function sanitize_title($title, $fallback_title = '', $context = 'save') { 789 791 $raw_title = $title; 790 $title = strip_tags($title); 791 $title = apply_filters('sanitize_title', $title, $raw_title); 792 793 if ( 'save' == $context ) 794 $title = remove_accents($title); 795 796 $title = apply_filters('sanitize_title', $title, $raw_title, $context); 792 797 793 798 if ( '' === $title || false === $title ) … … 795 800 796 801 return $title; 802 } 803 804 function sanitize_title_for_query($title) { 805 return sanitize_title($title, '', 'query'); 797 806 } 798 807 … … 817 826 $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title); 818 827 819 $title = remove_accents($title);820 828 if (seems_utf8($title)) { 821 829 if (function_exists('mb_strtolower')) {
Note: See TracChangeset
for help on using the changeset viewer.