I am having a problem with the way wordpress is encoding the urls provided by <?php echo the_permalink() ?>
The permalink setting are set to year/month/post-title and the permalinks look just like they should in the post editor.
Two things are happening. Some of the permalinks are being encoded with %20 instead of dashes and some are just getting spaces. The really tricky part is that some of the links work and some throw an error.
For example, a link that looks like this: /link to page - and another that looks like this: /link%20to%20page - both point to the same page, both are being served out of the same function, one of them works and one does not.
Any help, or even just any ideas, would be greatly appreciated.