xinclude doesn't handle encoded urls
- Dominant language
- C++
- Stars
- 18.7k
- Forks
- 3.1k
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
In php, if you want to use an xinclude to a file containing whitespace you need to encode the filename/path using url encoding. So to include "test include.xml" one needs to use ``.
In hhvm this triggers an error (with and without encoding)
given:
> "test include.xml"
>
> ``` xml
>
>
> test include
>
> ```
>
> "main.xml"
>
> ``` xml
>
>
>
>
> ```
The script:
``` php
load(__DIR__ . '/main.xml');
$doc->xinclude();
echo $doc->saveXML();
```
produces with php
``` xml
test include
```
and a warning with hhvm (and the x:include doesn't get executed)
``` xml
I/O warning : failed to load external entity "/path/test+include.xml"
/path/main.xml:3: element include: XInclude error : could not load /path/test+include.xml, and no fallback was found
```
Contributor guide
Assessment
This issue has not been assessed yet.