diff --git a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php
index e56add97a34ff..444a08a77685b 100644
--- a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php
+++ b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php
@@ -208,6 +208,7 @@ private function parseConfigs(\DOMElement $node, $path)
$options = [];
$condition = null;
+ /** @var \DOMElement $n */
foreach ($node->getElementsByTagNameNS(self::NAMESPACE_URI, '*') as $n) {
if ($node !== $n->parentNode) {
continue;
@@ -226,7 +227,7 @@ private function parseConfigs(\DOMElement $node, $path)
$requirements[$n->getAttribute('key')] = trim($n->textContent);
break;
case 'option':
- $options[$n->getAttribute('key')] = trim($n->textContent);
+ $options[$n->getAttribute('key')] = XmlUtils::phpize(trim($n->textContent));
break;
case 'condition':
$condition = trim($n->textContent);
diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/localized/utf8.xml b/src/Symfony/Component/Routing/Tests/Fixtures/localized/utf8.xml
new file mode 100644
index 0000000000000..95aff20cfee1a
--- /dev/null
+++ b/src/Symfony/Component/Routing/Tests/Fixtures/localized/utf8.xml
@@ -0,0 +1,13 @@
+
+
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: