Index: library/Zend/View/Helper/HeadScript.php =================================================================== --- library/Zend/View/Helper/HeadScript.php (revision 24956) +++ library/Zend/View/Helper/HeadScript.php (working copy) @@ -410,8 +410,8 @@ $attrString = ''; if (!empty($item->attributes)) { foreach ($item->attributes as $key => $value) { - if (!$this->arbitraryAttributesAllowed() - && !in_array($key, $this->_optionalAttributes)) + if ((!$this->arbitraryAttributesAllowed() && !in_array($key, $this->_optionalAttributes)) + || in_array($key, array('conditional', 'noescape'))) { continue; } @@ -422,10 +422,24 @@ } } + $addScriptEscape = !(isset($item->attributes['noescape']) && filter_var($item->attributes['noescape'], FILTER_VALIDATE_BOOLEAN)); + $type = ($this->_autoEscape) ? $this->_escape($item->type) : $item->type; $html = '';