Opened 14 years ago

Closed 14 years ago

#586 closed defect (fixed)

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 (2)

comment:1 Changed 14 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.

comment:2 Changed 14 years ago by mharrisonline

  • Resolution set to fixed
  • Status changed from new to closed

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

Note: See TracTickets for help on using tickets.