Ticket #586 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

GetHtml plugin adds doctype twice

Reported by: mharrisonline Owned by: gogo
Priority: normal Milestone:
Component: Plugin_Other Version:
Severity: normal Keywords:
Cc:

Description

When the GetHtml plugin is used with Xinha in full page mode, this source HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
</body>
</html>

becomes:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
  <head><title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><link id="IA-style" href="http://xinha.gogo.co.nz/xinha-nightly/plugins/InsertAnchor/insert-anchor.css" rel="stylesheet" />
  </head> 
  <body>
  </body>
</html>

Notice that the doctype is now before and after the HTML tag. Also, the attributes in the HTML tag are gone.

Without the GetHtml plugin, the example HTML becomes:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head><title>Untitled Document</title>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><link id=IA-style href="http://xinha.gogo.co.nz/xinha-nightly/plugins/InsertAnchor/insert-anchor.css" rel=stylesheet>

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

Change History

Changed 8 years ago by wymsy

I fixed the doctype problem and part of the html tag attributes problem in changeset:422. I say part of the problem because the fix only works in IE. But I also discovered that FireFox? loses the attributes of the html tag in the original getHTML function as well, i.e. it has never worked in mozilla.

Also the plugin now strips the trailing <br> tag that mozilla inserts.

Changed 8 years ago by mharrisonline

  • status changed from new to closed
  • resolution set to fixed

Thanks, wymsy. I'm closing the ticket since the issue is fixed. :)

Note: See TracTickets for help on using tickets.