Issues

ZF-11483: Zend_Captcha_Image does not repect doctype when producing image tag

Description

Method {{Zend_Captcha_Image::render()}} doest not take into account view's settings and produces always XHTML tag:


Here is fragment of {{Zend_Captcha_Image::render()}} method:


public function render(Zend_View_Interface $view = null, $element = null)
{
    return '';
}

I think we should use something of the kind:


// XHTML or HTML end tag?
$endTag = ' />';
if (($this->view instanceof Zend_View_Abstract) && !$this->view->doctype()->isXhtml()) {
    $endTag= '>';
}

return '

Of course we need access to current view.

Comments

Submitter has no CLA on file, so I borrowed the code in commited fix from another view helper (Zend_View_Helper_FormImage) to avoid any issues.

Fixed in trunk r24145 Merged to release-1.11 in r24146