From 005078e6587a4fe4f701b2dda5ec08a591490d48 Mon Sep 17 00:00:00 2001 From: Alex Debril Date: Wed, 7 Jun 2017 17:27:44 +0200 Subject: [PATCH] Decode HTML special chars to fix #94 --- src/FeedIo/Rule/Description.php | 2 +- tests/FeedIo/Rule/DescriptionTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FeedIo/Rule/Description.php b/src/FeedIo/Rule/Description.php index 99cb8e87..234d00e3 100644 --- a/src/FeedIo/Rule/Description.php +++ b/src/FeedIo/Rule/Description.php @@ -31,7 +31,7 @@ public function setProperty(NodeInterface $node, \DOMElement $element) } } - $node->setDescription($string); + $node->setDescription(htmlspecialchars_decode($string)); return $this; } diff --git a/tests/FeedIo/Rule/DescriptionTest.php b/tests/FeedIo/Rule/DescriptionTest.php index abbb1656..dc3260cd 100644 --- a/tests/FeedIo/Rule/DescriptionTest.php +++ b/tests/FeedIo/Rule/DescriptionTest.php @@ -50,7 +50,7 @@ public function testSetProperty() $document->appendChild($element); $this->object->setProperty($item, $element); - $this->assertEquals(htmlentities(self::HTML_DESCRIPTION), $item->getDescription()); + $this->assertEquals(self::HTML_DESCRIPTION, $item->getDescription()); } public function testCreateElement()