[wp-trac] [WordPress Trac] #18501: plugin_dir_path() returns unsanitized path on Windows installs

WordPress Trac wp-trac at lists.automattic.com
Mon Sep 19 13:41:00 UTC 2011


#18501: plugin_dir_path() returns unsanitized path on Windows installs
-------------------------------------+------------------------------
 Reporter:  johnjamesjacoby          |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Plugins                  |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  needs-testing has-patch  |
-------------------------------------+------------------------------

Comment (by dd32):

 I believe this issue mainly arises from the fact that some constants on
 windows environments contain a mixture of \ and / in the paths (which
 stems from `define( 'ABSPATH', dirname(__FILE__) . '/' );` using \),
 whilst most core functions standardise on / in created paths.. and even
 some of the API's do a `str_replace('\\','/'..`

 ideally fixing this as low as possible would be better IMHO.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18501#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list