~ubuntu-branches/ubuntu/lucid/tidy/lucid

« back to all changes in this revision

Viewing changes to test/input/in_431883.html

  • Committer: Bazaar Package Importer
  • Author(s): Jason Thomas
  • Date: 2008-01-20 21:46:03 UTC
  • mfrom: (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080120214603-poklofici9og61tx
Tags: 20080116cvs-2
* debian/control: build depends on xsltproc
  (closes: #461608)
* debian/tidy.preinst,postinst: add code to move old config file
  (closes: #461623)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
 
2
 
 
3
<!--
 
4
                          bug-2000-12-27-a.html
 
5
 
 
6
Problem:
 
7
  Running Tidy on this file produces the diagnostic:
 
8
 
 
9
    Doctype given is "-//W3C//DTD HTML 3.2//EN"
 
10
 
 
11
  ...when clearly the DOCTYPE is not as shown.  Problem appears to be that
 
12
  doctype is "fixed" in FixDocType before it is reported in ReportVersion.
 
13
  See "tidy.c" lines 1001, 1016.
 
14
 
 
15
Expected behavior:
 
16
 
 
17
  The DOCTYPE that appears in the file should be reported in the "Doctype
 
18
  given" diagnostic.
 
19
 
 
20
Verification:
 
21
  tidy -e bug-2000-12-27-a.html
 
22
 
 
23
Correction:
 
24
  tidy.c (main)
 
25
-->
 
26
 
 
27
<html>
 
28
 
 
29
<head>
 
30
<title>Bug-2000-12-27-A [ #431883 ] Given doctype reported incorrectly</title>
 
31
</head>
 
32
 
 
33
<body>
 
34
 
 
35
 
 
36
<!-- 
 
37
  If you use a plain table tag, tidy complains about
 
38
  no summary attribute and demotes the version to 3.2
 
39
-->
 
40
<table>
 
41
 
 
42
<!--  
 
43
  If you add a summary attribute to the table tag,
 
44
  tidy identifies the doc as 4.01 transitional.
 
45
 
 
46
<table summary="Tidy reports this as 3.2, not 4.0"> 
 
47
-->
 
48
 
 
49
<tr>
 
50
<td>A cell.</td>
 
51
</tr>
 
52
</table>
 
53
 
 
54
</body>
 
55
</html>