ZF-3928: Zend_View_Helper_HeadScript: no way to disable encoding of attributes passed to appendFile and related methods
Description
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.
Comments
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:
Posted by Jon Whitcraft (sidhighwind) on 2008-10-22T09:02:46.000+0000
the proper one for the style sheet is
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.