2011-03-14, 06:33:01
ccagle8 Wrote:hmmm... im not sure how that happened mvlcek. Let me look into this...
...
I see in basic.php there is the clean_url() function - but it hasnt been changed in quite a while. I see where it filters _ out, but im curious to see how long it's been like this...
...
Can you remove the '_' from the array within basic.php's clean_url() function and see if it fixes your plugin? (not sure why we are getting rid of '_' there anyway)
In 2.03 clean_url was only used to get an url from the title, if no url was entered. That's fine, as for these users we have to make sure that they can call the page - and fancy urls do not allow underscore.
In 3.0b clean_url also cleans the url itself and this is the problem. I suppose cleaning itself is ok, but it should not remove the underscore (as long as you do not use fancy urls, it's perfectly valid in any case) otherwise the I18N plugin will not work any more.
An alternative might be to add a hook changedata-cleanslug after the clean_url calls so that a plugin can reset the global $url to a differently cleaned url (e.g. with underscores) based on $_POST['post-id'] or $_POST['post-title'].