tidy error

"jeans_liujian" <[email protected]>
Newsgroups gmane.comp.web.html-tidy.user
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.