Skip to content

Commit a812c5a

Browse files
lennerdlsmith77
authored andcommitted
Fix special charater bug in schema location
Bugfix to encode schema location pathes if the base path of the project contains special characters like blanks.
1 parent 372fa1e commit a812c5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Routing/Loader/RestXmlCollectionLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ public function supports($resource, $type = null)
208208
protected function validate(\DOMDocument $dom)
209209
{
210210
$restRoutinglocation = realpath(__DIR__.'/../../Resources/config/schema/routing/rest_routing-1.0.xsd');
211-
$restRoutinglocation = str_replace('\\', '/', $restRoutinglocation);
211+
$restRoutinglocation = rawurlencode(str_replace('\\', '/', $restRoutinglocation));
212212
$routinglocation = realpath(__DIR__.'/../../Resources/config/schema/routing-1.0.xsd');
213-
$routinglocation = str_replace('\\', '/', $routinglocation);
213+
$routinglocation = rawurlencode(str_replace('\\', '/', $routinglocation));
214214
$source = <<<EOF
215215
<?xml version="1.0" encoding="utf-8" ?>
216216
<xsd:schema xmlns="http://symfony.com/schema"

0 commit comments

Comments
 (0)