I was just experimenting with kind of screen scrapping. So I tried
again, here the full file which caused on my Erlang OS X version R11B
the crash:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "
http://www.w3.org/
TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Foo</title>
<link rel="stylesheet" type="text/css" href="/static/rel/dojo/
resources/dojo.css" media="screen">
<link rel="stylesheet" type="text/css" href="/static/foo.css"
media="screen">
<!--[if lt IE 7]>
<style type="text/css">
.no_ie { display: none; }
</style>
<![endif]-->
<link rel="icon" href="/static/images/favicon.ico" type="image/x-
icon">
<link rel="shortcut icon" href="/static/images/favicon.ico"
type="image/x-icon">
</head>
<body id="home" class="tundra">
</body>
</html>
--------------------------------------------------
9> P=mochiweb_html:parse(B).
=ERROR REPORT==== 21-Nov-2007::05:38:14 ===
Error in process <0.37.0> with exit value: {function_clause,
[{mochiweb_html,tree,[[{comment,"[if lt IE 7]>\n <style type=\"text/
css\">\n .no_ie { display: none; }\n </style>\n <![endif]"},
{data,"\n ",true},{start_tag,"link",[{"rel","icon"},{"href"...
** exited: {function_clause,
[{mochiweb_html,
tree,
[[{comment,
"[if lt IE 7]>\n <style type=\"text/css\">
\n .no_ie { display: none; }\n </style>\n <![endif]"},
{data,"\n ",true},
-------------------------------------------------
when I take out the conditional comment I don't get the crash anymore:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "
http://www.w3.org/
TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<title>Foo</title>
<link rel="stylesheet" type="text/css" href="/static/rel/dojo/
resources/dojo.css" media="screen">
<link rel="stylesheet" type="text/css" href="/static/foo.css"
media="screen">
<link rel="icon" href="/static/images/favicon.ico" type="image/x-
icon">
<link rel="shortcut icon" href="/static/images/favicon.ico"
type="image/x-icon">
</head>
<body id="home" class="tundra">
</body>
</html>
Am I doing something wrong ?
regards
Roberto