Issues

ZF-2606: Adding htmlentities() in createElement()

Description

i always got this warning when using Zend_Feed,

PHP Warning: DOMDocument::createElement(): unterminated entity reference irec=1

it happens when the feed entry has "irec=1", so the entry is truncated on that part. I read in PHP Manual (http://php.oregonstate.edu/manual/en/…), and i found out there's something must be add in Zend/Feed/Element.php on line 209.

I tried to change this line 209 into :

$node = $this->_element->ownerDocument->createElement($var, htmlentities($val));

i added htmlentities(), and the warning is gone, and the entry is not truncated.

So you guys should add this htmlentities() i think,

Comments

Setting priority for release and assigning for review.

This issue should have been fixed for the 1.5 release.

This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.

Fixed in trunk (r18567) and in 1.9-release branch (r18568)