Issues

ZF-5838: Incorrect usage of XHTML Endtag

Description

With a HTML doctype (set to view), JQuery still writes with a XHTML closing /> I think it would be a good idea if Zend_JQuery would use the View Helpers HeadLink() and HeadScript().

Comments

do you mean the tags?

I can't use HeadLink and HeadScript, because they don't enforce dependencies which are required, also they offer only one stack and no additional loading on that, it has some disadvantages.

Hi,

Sorry for being unclear. I quicksaved the bugs i found yesterday in my project, so its a bit messy for me. I meant to say .

Can't you create a new object and use it as stack only or is that to much of a memory overload? Or is it singleton? Sorry, if this is a bit noobish.

Here's some example code:

<?php $this->jQuery()->setLocalPath('/script/jquery/jquery-1.3.1.js'); ?>
<?php $this->jQuery()->setUiLocalPath('/script/jquery/jquery-ui-1.6rc6.js'); ?>
<?php $this->jQuery()->addStylesheet('/style/jquery/ui.all.css'); ?>
<?php $this->jQuery()->enable(); ?>
<?php $this->jQuery()->uiEnable(); ?>
<?= $this->jQuery(); ?>

This returns:

I'm using the HTML4.01 STRICT doctype, and as you see, the tag is being rendered as being XHTML. HTML does not require the tag to be closed as far as i know.

It is possible to fetch the Doctype from the view object ofcourse, if that isnt done already.

Keep up the good work.

if its i already fixed it in one of the other bugs ups :-)

the container helpers are always singletons via Zend_Registry internally, which is very ugly, but thats the way its done :-/

Fixed in ZF-5839 and merged back into 1.7 release branch