ZF-12303: useDefaultFilters option in Zend_Markup factory has no effect


$bbcode = Zend_Markup::factory('Bbcode', 'Html', array('useDefaultFilters' => false)); has no effect. render() method in RendererAbstract calls getDefaultFilter() which in turn calls addDefaultFilters() without checking for the option. It does not even have a way to check for that option because __constructor() keeps the options in local scope. I suggest adding a protected property $_options and assign to it the $options array in construct so that addDefaultFilters() method can check for its value with

if (null === $this->_defaultFilter && (!isset($this->_options['useDefaultFilters']) || ($this->_options['useDefaultFilters'] === true)) ) {


No comments to display