Zend Framework

Adding htmlentities() in createElement()

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.3
  • Fix Version/s: 1.9.5
  • Component/s: Zend_Feed
  • Labels:
    None
  • Fix Version Priority:
    Should Have

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/function.dom-domdocument-createelement.php), 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,

Activity

Hide
Wil Sinclair added a comment -

Setting priority for release and assigning for review.

Show
Wil Sinclair added a comment - Setting priority for release and assigning for review.
Hide
Wil Sinclair added a comment -

This issue should have been fixed for the 1.5 release.

Show
Wil Sinclair added a comment - This issue should have been fixed for the 1.5 release.
Hide
Wil Sinclair added a comment -

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

Show
Wil Sinclair added a comment - This doesn't appear to have been fixed in 1.5.0. Please update if this is not correct.
Hide
Stefan Gehrig added a comment -

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

Show
Stefan Gehrig added a comment - Fixed in trunk (r18567) and in 1.9-release branch (r18568)

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: