What problem are you having with " "? I didn't realize it's not valid XHTML. Should it be " " instead?
-- Hector On Fri, May 14, 2010 at 11:54 AM, Andrew Ballard <[email protected]> wrote: > On Fri, May 14, 2010 at 2:27 PM, Hector Virgen <[email protected]> wrote: > > I suggest using the response object for outputting headers instead of > doing > > that in index.php. You might run into issues later when you try to set > > cookies or start the session if headers have already been sent. > > To use the response object, you can use a front controller plugin to > > manipulate the response. Since the response is not procedural, it doesn't > > really matter when you set the headers as long as its before the response > is > > sent (which I believe happens after dispatchLoopShutdown). > > I had planned on doing something like that if the test worked. This > was just a quick-and-dirty test to see if browsers would even handle > the response correctly before justifying all that. > > > Also, you if you specify the view's doctype early (like perhaps in your > > bootstrap), > > I am. > > > then most (if not all) ZF view helpers will honor the doctype > > and correctly self-close their tags and such. This should include > Zend_Form, > > but I don't know if it will affect (which I thought was valid > > XHTML). > > Indeed it does with respect to the correct tag style for XHTML. As far > as the <style> tag, it escapes the contents with regular HTML comment > tags (<!-- -->), which tells the XML parser to ignore the contents > entirely. It may be that the safest route will be to always extract > these to an external file. If so, it might be worth noting in the > manual. > > It does not seem to do much for non-breaking spaces that are > hard-coded into the framework. I just ran a quick scan and found only > two places, so this might be a simple matter to fix: > > Zend_Form_Decorator_DtDdWrapper > Zend_Form_Decorator_Label > > Anything in the framework that relies on htmlentities() (I see 8 > files) could be troublesome though, since it is a native PHP function > whose documentation says that it converts characters into their "most > common form". > > > > You can specify the doctype by calling $view->doctype('XHTML1_STRICT'). > > I've already set it in the bootstrap, so I just echo $this->doctype() > at the top of my layout script. The correct DOCTYPE is generated, and > I prefix the document with a valid XML declaration. > > > Andrew >
