Hello,

I’m getting an unexpected behaviour with the serialization option include-content-type and file:write with HTML.

If I write a document without a <head> element then one doesn’t get added and nothing happens.

file:write("test.htm",<html><body/></html>,map {"method":"html", "html-version":"4.0","include-content-type":"yes”})

returns:

<html>
  <body></body>
</html>

Is this correct?

If there is a head then the <meta> gets added with no problems - unless there is already a meta element, in which case it gets replaced.

file:write("/Users/jb8748/test.htm",<html><head><meta http-equiv="refresh" content="60" /></head><body/></html>,map {"method":"html", "html-version":"4.0","include-content-type":"yes”})

returns:

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body></body>
</html>

Is this correct?

All running Running Beta 8.4 f5341cc

Many thanks, James