From e226efe19ae4b72bc78b89ebc2c4747ea160b80d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 18 Nov 2006 16:43:33 +0100 Subject: hide inline scripts from XML parsers This patch addes some comment magic to inline scripts to hide them from XML parsers (like the W3C CSS validator). darcs-hash:20061118154333-7ad00-c24bc36192080fe34f232c5ec2df3f494993f2fe.gz --- inc/template.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'inc/template.php') diff --git a/inc/template.php b/inc/template.php index cf3bf8da0..e9326632d 100644 --- a/inc/template.php +++ b/inc/template.php @@ -278,6 +278,11 @@ function _tpl_metaheaders_action($data){ foreach($inst as $attr){ echo '<',$tag,' ',buildAttributes($attr); if(isset($attr['_data'])){ + if($tag == 'script' && $attr['_data']) + $attr['_data'] = ""; + echo '>',$attr['_data'],''; }else{ echo '/>'; -- cgit v1.2.3