Forum Bugs

noscript tag in document head

henning
Hi,

It seems that Prince doesn't like noscript tags in the document head. The tag is in the HTML file for other reasons, not for Prince.

Here is the HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test</title>
<noscript><link rel="stylesheet" href="test.css" /></noscript>
</head>
<body>
Test
</body>
</html>


And here is the Prince output:

$ /usr/local/bin/prince test.html --input=html --output=test.pdf
prince: test.html:7: error: Unexpected end tag : head
prince: test.html:8: error: htmlParseStartTag: misplaced <body> tag


Is is really a minor issue since Prince still converts the file.

We're using Prince 8.1 rev 3 on Solaris.

Thanks,

Henning
mikeday
The new HTML5 parser should fix this issue. It is experimentally available with "-i html5" on the command-line, if you would like to try it out; from the next release it will become the default HTML parser.
henning
Yes, that works. It is also good to know that HTML5 will be the default.
Thanks!