From: Christian Weiske Date: Wed, 25 Nov 2015 22:51:06 +0000 (+0100) Subject: Fix URL encoding in mediatomb X-Git-Tag: v0.1.0~4 X-Git-Url: https://git.cweiske.de/noxon-gateway.git/commitdiff_plain/1e760a31e2856fd1af842c206d0a567a3b6a3073 Fix URL encoding in mediatomb --- diff --git a/src/mediatomb.php b/src/mediatomb.php index 74b7f84..e8bbfcb 100644 --- a/src/mediatomb.php +++ b/src/mediatomb.php @@ -9,7 +9,7 @@ function handleRequestMediatomb($fullPath, $prefix) try { $smt = new Services_MediaTomb($user, $pass, $host, $port); - $path = substr(urldecode($fullPath), strlen($prefix)); + $path = substr($fullPath, strlen($prefix)); $container = $smt->getContainerByPath($path); $listItems = array(); addPreviousItem($listItems, $fullPath); @@ -17,7 +17,7 @@ function handleRequestMediatomb($fullPath, $prefix) foreach ($container->getContainers() as $subContainer) { $listItems[] = getDirItem( $subContainer->title, - $fullPath . rawurlencode($subContainer->title) . '/' + pathEncode($fullPath . $subContainer->title) . '/' ); }