Skip to content

Commit

Permalink
Merge pull request #164 from alexdebril/issue/163
Browse files Browse the repository at this point in the history
Backport and close #161
  • Loading branch information
alexdebril authored Jan 12, 2018
2 parents 2965c76 + 777402a commit f0e4dd6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/FeedIo/Rule/Description.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ protected function hasValue(NodeInterface $node) : bool
protected function addElement(\DomDocument $document, \DOMElement $rootElement, NodeInterface $node) : void
{
$description = htmlspecialchars($node->getDescription());
$element = $document->createElement($this->getNodeName(), $description);
if ($description !== $node->getDescription() && $this->getNodeName() != 'description') {
$element->setAttribute('type', 'html');
}

$rootElement->appendChild($document->createElement($this->getNodeName(), $description));
$rootElement->appendChild($element);
}
}

0 comments on commit f0e4dd6

Please sign in to comment.