-
Notifications
You must be signed in to change notification settings - Fork 435
Open
Labels
Milestone
Description
Documentation states:
--escape-cdataBoolean (noif unset)
This option specifies if Tidy should convert sections to normal text.
On current HEAD (f0438bd):
$ tidy --escape-cdata yes <<EOF
<?xml version="1.0" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><meta charset="utf-8" /></head>
<body>
<script><![CDATA[
foo
]]></script>
</body></html>
EOF
Returns:
Info: Document content looks like XHTML5
No warnings or errors were found.
<?xml version="1.0"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content=
"HTML Tidy for HTML5 for Linux version 5.7.0" />
<title></title>
<meta charset="utf-8" />
</head>
<body>
<script>
<![CDATA[
foo
]]>
</script>
</body>
</html>
The CDATA section is still there.