Once again you just give up too easily. PHP is no harder than Perl. You're just being lazy.
sanitize_title applied to a post title by the sanitize_title function, after stri +pping out HTML tags. wordpress/wp-includes/taxonomy.php: $value = apply_filters("pre +_term_$field", $value, $taxonomy); wordpress/wp-includes/default-filters.php:$filters = array('pre_term_s +lug'); wordpress/wp-includes/plugin.php:function apply_filters($tag, $value) +{ wordpress/wp-includes/formatting.php:function sanitize_file_name( $nam +e ) { // Like sanitize_title, but with periods wordpress/wp-includes/formatting.php:function sanitize_title($title, $ +fallback_title = '') { wordpress/wp-includes/formatting.php: $title = apply_filters('sanit +ize_title', $title); wordpress/wp-includes/taxonomy.php: $args['query_var'] = saniti +ze_title_with_dashes($args['query_var']); wordpress/wp-includes/taxonomy.php: $args['rewrite']['slug' +] = sanitize_title_with_dashes($taxonomy); wordpress/wp-includes/taxonomy.php: $value = sanitize_title($va +lue); wordpress/wp-includes/taxonomy.php: $slug = sanitize_title($slu +g); wordpress/wp-includes/taxonomy.php: if ( '' === $slug = sanitize_ti +tle($term) ) wordpress/wp-includes/taxonomy.php: $slug = sanitize_title($nam +e); wordpress/wp-includes/taxonomy.php: $slug = sanitize_title($slu +g, $term_id); wordpress/wp-includes/taxonomy.php: $slug = sanitize_title($nam +e); wordpress/wp-includes/taxonomy.php: $slug = sanitize_title($nam +e, $term_id); function add_filter($tag, $function_to_add, $priority = 10, $accepted_ +args = 1) { global $wp_filter, $merged_filters; $idx = _wp_filter_build_unique_id($tag, $function_to_add, $priorit +y); $wp_filter[$tag][$priority][$idx] = array('function' => $function_ +to_add, 'accepted_args' => $accepted_args); unset( $merged_filters[ $tag ] ); return true; } // Slugs $filters = array('pre_term_slug'); foreach ( $filters as $filter ) { add_filter($filter, 'sanitize_title'); } add_filter('sanitize_title', 'sanitize_title_with_dashes'); function sanitize_title_with_dashes($title) { $title = strip_tags($title); // Preserve escaped octets. $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $ +title); // Remove percent signs that are not part of an octet. $title = str_replace('%', '', $title); // Restore octets. $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $ +title); $title = remove_accents($title); if (seems_utf8($title)) { if (function_exists('mb_strtolower')) { $title = mb_strtolower($title, 'UTF-8'); } $title = utf8_uri_encode($title, 200); } $title = strtolower($title); $title = preg_replace('/&.+?;/', '', $title); // kill entities $title = preg_replace('/[^%a-z0-9 _-]/', '', $title); $title = preg_replace('/\s+/', '-', $title); $title = preg_replace('|-+|', '-', $title); $title = trim($title, '-'); return $title; }
http://www.w3schools.com/php/func_string_strip_tags.asp
http://www.php.net/preg_replace
http://www.php.net/strip_tags
http://www.php.net/trim
http://www.php.net/strtolower
WordPress › Support » How does WP remove accents from Polish characters?
http://codex.wordpress.org/Function_Reference_2.0.x

http://adambrown.info/p/wp_hooks/hook/sanitize_title?version=2.6&file=wp-includes/formatting.php
http://postedpost.com/2008/06/22/hack-wordpress-sanitize-title-function/
http://postedpost.com/2008/06/23/ultimate-wordpress-post-name-url-sanitize-solution/

In reply to Re^3: WordPress 'sanitize_title' by Anonymous Monk
in thread WordPress 'sanitize_title' by Klammer

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.