Wow, I was surprised to find out no one was able to say anything about this topic… ??
I’m talking about the substitution of characters like ~!@#$%^&*()= etc to dashes in post titles or tags. You see, I was able to find out that this was done through a couple of functions located in the wp-includes/formatting.php file.
There is wptexturize(); which substitutes these:
array("'tain't","'twere","'twas","'tis","'twill","'til","'bout","'nuff","'round","'cause");
and some others.
There’s also sanitize_title_with_dashes() – the one I believe does all the magic substitutions in post titles. Apparently I draw this conclusion from the function name.
But now the problems is I can’t find out which part of the function tells it to remove the dots. In fact I get more confused by this line:
$title = trim($title, '-');
which is supposed to trim (remove) dashes out of posts. Yet if you make a post with post title word1-word2 the post url remains word1-word2 and the title isn’t trimmed (nor the url).
I really hope someone could help me out here…