<style></style> Question
Permalink
Hi guys! I am in the process of building a website for a client and I am running into one weird issue. In the header I am pulling an extra <style> tag with nothing inside of it. I checked my header and it is not in my header element. I believe it is in the header required include.
This is preventing the website from validating with W3C. If anyone could point me in the right direction with removing this it would be much appreciated!
Specs:
Web URL:http://www.imagecontrolbeta.com/isciwny/...
W3C URL:http://validator.w3.org/check?uri=http%3A%2F%2Fimagecontrolbeta.com...
C5 Version: 5.3.3.1
This is preventing the website from validating with W3C. If anyone could point me in the right direction with removing this it would be much appreciated!
Specs:
Web URL:http://www.imagecontrolbeta.com/isciwny/...
W3C URL:http://validator.w3.org/check?uri=http%3A%2F%2Fimagecontrolbeta.com...
C5 Version: 5.3.3.1
this is by the way already fixed in the trunk..
Thanks! No more empty style tag and invalid code. ^_^
this is fixed in 5.4 ;-)
Not sure if I'm missing something but i just downloaded the 5.4 version an I was having the same issue, there is no block_styles.php file on the 5.4 version so i keept looking and i found that line 398 of the file collection.php under the concrete/models folder was causing the empty style issue so I made the following change;
To
After that the empty style tag disappear, hope I didn't break anything else :)
$v->addHeaderItem("<style type=\"text/css\"> \r\n".$styleHeader.'</style>', 'VIEW');
To
After that the empty style tag disappear, hope I didn't break anything else :)
as mentioned in many other threads.... Please put this change in c5 code... so that we can close this issue with empty style tags! :-)
I just committed this to subversion - thx.
Thank you very much.
if you'd like to make the fix in your installation, then open /concrete/models/block_styles.php, then in the method addHeaderItems() change the line:
..to...
(there should be no line breaks there)