symfony/symfony — Issue #2805: Filepath not escaped in XmlDumper
Author: noetix
Created: 2011-12-08 12:23:05+00:00
State: open

It seems paths with ampersand symbols (&) aren't escaped in the file below:

[ErrorException]
Warning: DOMDocument::createElement(): unterminated entity reference Mrs Joyce\Atticus\app/../vendor/facebook/src/base_facebook.php in D:\Development\Projects\Mr & Mrs Joyce\Atticus\vendor\symfony\src\Symfony\Component\DependencyInjection\Dumper\XmlDumper.php line 145

The problem can be fixed by using ```htmlentities``` on Line 145.

Before:

$file = $this->document->createElement('file', $definition->getFile());

After:

$file = $this->document->createElement('file', htmlentities($definition->getFile()));

Hope this is helpful, first Issue submitted on Github.. ever!