ZF-3928: Zend_View_Helper_HeadScript: no way to disable encoding of attributes passed to appendFile and related methods

Issue Type: Bug Created: 2008-08-11T14:49:21.000+0000 Last Updated: 2008-11-13T14:10:22.000+0000 Status: Resolved Fix version(s): - 1.7.0 (17/Nov/08)

Reporter: Cole Snodgrass (cole.snodgrass) Assignee: Jon Whitcraft (sidhighwind) Tags: - Zend_View

Related issues: Attachments: - zf3928.patch


There is currently no way (at least that I could dissect) to disable encoding of values passed into Zend_View_Helper_HeadScript::appendFile which causes some 3rd-party javascript API's to break.

For example, if I need to link to a javasript API that requires that I pass in more then one parameter in order to remotely load the file. I am currently unable to do this as the '&' separating the parameters will be automatically encoded to '&'

For example. $this->view->HeadScript()->appendFile('http://server/script.js?v=1.2&id=123'); will generate the following code:

which causes the remote server to not see the 'id' variable b/c it doesn't see the '&' delimiter and thus refuses to let me access the javascript api.

In the Zend_View_Helper_HeadScript::itemToString method there should be a way to disable calling htmlspecialchars.


Posted by Jon Whitcraft (sidhighwind) on 2008-10-20T15:00:46.000+0000

This issue also affects HeadLink Helper.

Posted by Jon Whitcraft (sidhighwind) on 2008-10-22T09:01:29.000+0000

Attached is the proposed patch file.

With this file you can call your string like this:

<pre class="highlight">



Posted by Jon Whitcraft (sidhighwind) on 2008-10-22T09:02:46.000+0000

the proper one for the style sheet is

<pre class="highlight">

Posted by Jon Whitcraft (sidhighwind) on 2008-10-23T18:06:01.000+0000

Fixed in r12106.

Posted by Wil Sinclair (wil) on 2008-11-13T14:10:22.000+0000

Changing issues in preparation for the 1.7.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.