diff --git a/lib/Document.php b/lib/Document.php index 7fb04c4a5..2582686bb 100644 --- a/lib/Document.php +++ b/lib/Document.php @@ -221,6 +221,7 @@ public function createProperty($name, $value = null, array $parameters = null, $ if (is_null($class)) { // If a VALUE parameter is supplied, we should use that. if (isset($parameters['VALUE'])) { + var_dump($parameters['VALUE']); $class = $this->getClassNameForPropertyValue($parameters['VALUE']); if (is_null($class)) { if (in_array(strtoupper($parameters['VALUE']), $this->allowedIllegalValues, true)) { diff --git a/tests/VObject/InvalidValueParamTest.php b/tests/VObject/InvalidValueParamTest.php index cd069960c..514e9ce74 100644 --- a/tests/VObject/InvalidValueParamTest.php +++ b/tests/VObject/InvalidValueParamTest.php @@ -28,4 +28,27 @@ public function testWorkaround() $doc = Reader::read($event); $this->assertEquals("LOCATION:EXAMPLE\r\n", $doc->VEVENT->LOCATION->serialize()); } + + public function testInvalidValue() + { + $event = <<assertEquals("LOCATION:Route de Boulogne\, \r\n32220 Lombez\n France\r\n", $doc->VEVENT->LOCATION->serialize()); + } }