tidy error

hi,
i have a problem while i use tidy to convert my html page:


when the javascript  nested dynamic script ,like this:


$html = '<html><head>
<script>
document.write("<script type=\'text/javascript\' src=\'http://61.135.253.47/ipquery\'><" + "/script>");
contemt =\'<div class="s"><a href="http://weather.news.163.com/"></a></div>\';
</script>
<body>
<DIV id="test">eee</div>
<script>
contemt =\'<div class="s"><a href="http://weather.news.163.com/"></a></div>\';
</script>
</body></html>
';



    but the result like this:


    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<script type="text/javascript">
document.write("<script type='text/javascript' src='http://61.135.253.47/ipquery'><" + "/script>");
contemt ='<div class="s"><a href="http://weather.news.163.com/"><\/a><\/div>';
<\/script>
<body>
<DIV id="test">eee<\/div>
<script>
contemt ='<div class="s"><a href="http://weather.news.163.com/"><\/a><\/div>';
<\/script>
<\/body><\/html>
</script>
<title></title>
</head>
<body>
</body>
</html>

my configure like this:

$config = array(
'output-xhtml' => false,
//'escape-cdata' => true,
'fix-backslash' => false,
'new-blocklevel-tags' => 'script,div',
'literal-attributes'=> false,
'fix-bad-comments' => false,
//'indent' => true,
//'indent-cdata' => false,
//'join-classes' => false,
//'join-styles' => false,
'merge-divs' => false,
'preserve-entities'=> true,
//'break-before-br' => false,
'show-errors' => 6,
//'show-warnings' => true,
//'wrap'=>0,
'wrap-sections'=>false,
//'quote-nbsp' => false,
'wrap-script-literals' => false,
);

2009-09-07 



jeans_liujian 

Received on Monday, 7 September 2009 11:29:36 UTC