Index: branches/5.1.x/core/units/helpers/file_helper.php =================================================================== diff -u -N -r14391 -r14477 --- branches/5.1.x/core/units/helpers/file_helper.php (.../file_helper.php) (revision 14391) +++ branches/5.1.x/core/units/helpers/file_helper.php (.../file_helper.php) (revision 14477) @@ -1,6 +1,6 @@ CheckFolder($parent_path); if ($result) { @@ -393,8 +393,11 @@ function urlToPath($url) { $base_url = rtrim($this->Application->BaseURL(), '/'); - $path = preg_replace('/^' . preg_quote($base_url, '/') . '(.*)/', FULL_PATH . '\\1', $url); + // escape replacement patterns, like "\" + $full_path = preg_replace('/(\\\[\d]+)/', '\\\\\1', FULL_PATH); + $path = preg_replace('/^' . preg_quote($base_url, '/') . '(.*)/', $full_path . '\\1', $url, 1); + return str_replace('/', DIRECTORY_SEPARATOR, rawurldecode($path)); } } \ No newline at end of file