Sign In  |  Cart  |  Join Now

<style> tag in code not validating

November 04, 2009
Hi all.

I have built my site, which validated fine, but as soon as I place into Concrete 5 it does not.

The code in question is:

<link rel="stylesheet" type="text/css" href="/excointouch/root/concrete_root/concrete/css/ccm.base.css" />
<script type="text/javascript" src="/excointouch/root/concrete_root/concrete/js/jquery.js"></script>
<script type="text/javascript" src="/excointouch/root/concrete_root/concrete/js/ccm.base.js"></script>
<style>
</style>
<!-- Site Header Content //-->

The problem is the:
<style>
</style>

How can I delete this?!? I can't find at anywhere.

Please help!

re: <style> tag in code not validating

Nov 04, 2009 at 11:06 AM
OK I found whats causing it. Its in the file 'block_styles.php'. This is the offending code:

//add to header
$v = View::getInstance();
$v->addHeaderItem("<style> \r\n".$blockStylesHeader.'</style>', 'CONTROLLER');
self::$headerStylesAdded=1;


Whats the best way to make this validate? Delete it? I did delete and the site still worked and I was able to edit.

Is there a way not to delete it and make it validate?

I am going to try a few things too.
 

re: <style> tag in code not validating

Nov 04, 2009 at 11:40 AM
Got it to work:

//add to header
$v = View::getInstance();
if($blockStylesHeader != '') {
$v->addHeaderItem("<style> \r\n".$blockStyleHeader.'<style>', 'CONTROLLER');
self::$headerStylesAdded=1; }
}
 

re: <style> tag in code not validating

Nov 05, 2009 at 1:21 PM
more
//add to header
$v = View::getInstance();
if($blockStylesHeader != '') {
    $v->addHeaderItem('<style type="text/css">'."\r\n".$blockStyleHeader.'</style>', 'CONTROLLER');
    self::$headerStylesAdded=1; 
}
 

re: <style> tag in code not validating

Nov 06, 2009 at 4:10 AM
Nice one that works too butpnly if you don't have the <?php open and closing around it...

//add to header
$v = View::getInstance();
if($blockStylesHeader != '') {
$v->addHeaderItem('<style type="text/css">'."\r\n".$blockStyleHeader.'</style>', 'CONTROLLER');
self::$headerStylesAdded=1;
}

}
 

re: <style> tag in code not validating

Nov 06, 2009 at 12:11 PM
"<?php" entered by the automatic operation when inputting, "[code]".
 

re: <style> tag in code not validating

Mar 29, 2010 at 5:42 PM
this is fixed in 5.4
 
 

Hot Spots...

ForumsPartners | Contact | Blog

Search site