[wp-trac] [WordPress Trac] #16457: Issues with DIRECTORY_SEPARATOR
WordPress Trac
wp-trac at lists.automattic.com
Fri Feb 4 23:16:01 UTC 2011
#16457: Issues with DIRECTORY_SEPARATOR
-------------------------------+------------------------------
Reporter: grandslambert | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.0.4
Severity: normal | Resolution:
Keywords: reporter-feedback |
-------------------------------+------------------------------
Comment (by dd32):
> The plugin registers a menu icon, which uses an object variable for the
Plugin URL which is built using DIRECTORY_SEPARATOR. This works OK on *nix
based machines, but NOT on Windows.
DIRECTORY_SEPARATOR is the filesystem separator, Not a HTTP Separator, As
such, attempting to use it in a string which is used as a URL ''will''
cause problems.
Core doesnt convert /, rather, in many places it converts "\\" to / in
order for a consistent path environment, You cant do str_replace() on
strings which have mixed separators, nor strpos() etc, which causes havoc
with certain functions, When you take into account that WordPress itself
is using / in all the paths it hard-codes, it becomes even more of an
awkward environment on windows.
Like scribu said however, Show us the code! We might need to add some
win32=>linux path format sanitization in a few more places.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16457#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list