ZF-5846: Stylesheets are broken for Firefox 3 with application/xhtml+xml as Content-Type


{{Dojo_View_Helper_Dojo_Container}} inserts an improper comment tag when producing stylesheet imports:

h4. Code:

class My_Controller_Plugin_LayoutSelector
    extends Zend_Controller_Plugin_Abstract
    public function routeStartup(Zend_Controller_Request_Abstract $request)
               if (strpos($accepts, 'application/xhtml+xml')) {
                'application/xhtml+xml; charset=UTF-8');
        } else {
                'text/html; charset=UTF-8');

in view script:

<?= $this->dojo()->enable()
    ->setDjConfigOption('parseOnLoad', true)

h4. Output:

This causes Firefox 3 to not process the CSS in the style:…

This issue is probably not limited to Firefox, and should affect Opera 7+ and Mozilla 1.0+.

This issue will not occur when using Content-Type of {{text/html}}, as Firefox does not check the document for validity as XML.

h4. Workaround: Manually import all stylesheets with link tags or correct {{@import}} statements.

h4. Required fix: Check returned Content-Type and remove comments if {{application/xhtml}}.


Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.