Closed Bug 419838 Opened 18 years ago Closed 18 years ago

Parser gets confused by XHTML <a /> tag

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 162653

People

(Reporter: felix.ospald, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12 Consider the following files: File1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <style type="text/css"> .x { line-height: 50px; display: inline; border: 1px #000 solid; text-decoration: underline; } .x a { vertical-align: middle; } </style> </head> <body> <img /> <span class="x">Die <a href="#x2">PDF-Datei</a> wurde erfolgreich erstellt.</span> </body> </html> File2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <style type="text/css"> .x { line-height: 50px; display: inline; border: 1px #000 solid; text-decoration: underline; } .x a { vertical-align: middle; } </style> </head> <body> <a name="x1" /> <div class="x">Die <a href="#x2">PDF-Datei</a> wurde erfolgreich erstellt.</div> </body> </html> File3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <style type="text/css"> .x { line-height: 50px; display: inline; border: 1px #000 solid; text-decoration: underline; } .x a { vertical-align: middle; } </style> </head> <body> <a name="x1" /> <span class="x">Die <a href="#x2">PDF-Datei</a> wurde erfolgreich erstellt.</span> </body> </html> Reproducible: Always Steps to Reproduce: 1. File1 shows the correct behavior. 2. File2 vertical aligns "Die PDF-Datei" instead of only "PDF-Datei". 3. File3 shows that the span-tag is closed after "Die ". Actual Results: confusion Expected Results: <a /> behaves like <img />
Related to bug: 419833
Severity: normal → major
Which MIME type are you using? (see "Tools->Page Info->General:Type")
Given that the HTML element doesn't have an xmlns attribute, I'm guessing text/html.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
The MIME type is indeed text/html. But how can I put firefox into xml mode? <?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> ... doesn't work either. Also without the "<?xml version="1.0" ?>"
I see: >> If you want us to parse your XHTML as XML, please give it the correct MIME type (text/xml or application/xhtml+xml). Thanks anyway.
You need to log in before you can comment on or make changes to this bug.