Posted by Kragh on February 23, 2010 at 1:34pm
Hello all, Sorry if I post wrong, But..... Is it only me there load UTF8 twice?, Here from my source:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />Can anyone tell me why?
Edited by silverwing - moved to post installation forum
Comments
Add this snippet to your theme template.php
It was there for some reason but if you want to clean up the code open your current theme template.php file and insert the snippet below, just make sure you replace the word THEMENAME with the name of your theme.
/**
* Note: Replace THEMENAME with the name of your theme!
*/
function THEMENAME_preprocess_page(&$vars) {
$vars['head'] = preg_replace('/<meta http-equiv=\"Content-Type\"[^>]*>/', '',
$vars['head']);
}
if you don't have template.php just create this file and paste the snippet.
<?php
/**
* Note: Replace THEMENAME with the name of your theme!
*/
function THEMENAME_preprocess_page(&$vars) {
$vars['head'] = preg_replace('/<meta http-equiv=\"Content-Type\"[^>]*>/', '',
$vars['head']);
}
?>
THANK YOU, Great :), Its
THANK YOU, Great :), Its work!
Sincerely,
Kevin Kragh
... or just remove it from
... or just remove it from page.tpl.php
--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.
Removing that is a bad idea
Removing that is a bad idea because I have seen modules that rely on this to load in API keys and other elements there. Plus, you should be always declaring content type.
I am very curious as to why this happens. I've been noticing it for a while and it bothers me as well. Anyone who knows why this gets set twice that can chime in on this thread?
More info here
http://drupal.org/node/451304
In what way do modules rely
In what way do modules rely on the actual meta tag in page.tpl.php to load API keys?
--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.
Openlayers
Heine - The Openlayers module loads in a script tag as well as any API keys you have via javascript using $head. This may actually be a bug as far as I know, since it seems like the wrong way to do it... Maybe there is something about having these scripts load very first that the module needs?
Sorry, I was thinking of
Sorry, I was thinking of something else entirely; $head should indeed NOT be removed.
--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.