Allow underscores in category and author names.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren
2004-05-16 22:07:26 +00:00
parent f6e35d2384
commit c454490973
2 changed files with 10 additions and 4 deletions

View File

@@ -1,5 +1,7 @@
<?php
add_action('sanitize_title', 'convert_spaces_to_dashes');
function wptexturize($text) {
$output = '';
// Capture tags and everything inside them
@@ -81,12 +83,16 @@ function sanitize_title($title) {
$title = preg_replace('/&.+?;/', '', $title); // kill entities
$title = preg_replace('/[^a-z0-9 -]/', '', $title);
$title = preg_replace('/\s+/', ' ', $title);
$title = do_action('sanitize_title', $title);
$title = trim($title);
$title = str_replace(' ', '-', $title);
$title = preg_replace('|-+|', '-', $title);
return $title;
}
function convert_spaces_to_dashes($content) {
$content = str_replace(' ', '-', $content);
$content = preg_replace('|-+|', '-', $content);
}
function convert_chars($content, $flag = 'obsolete') {
global $wp_htmltranswinuni;