Closed Bug 268565 Opened 20 years ago Closed 20 years ago

colored link in CSS cause colored normal text if an anchor exist before the text

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: cimmino.marco, Assigned: dbaron)

Details

Attachments

(3 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

When handle a colored link in CSS and you add an anchor without text the text
below the anchor will be colore like the link!

See attachment...

Reproducible: Always
Steps to Reproduce:
1. use a CSS with colored links
2. put an anchor without text (a "nbsp;" in the anchor resolve the problem)
3. see the attachment

Actual Results:  
All text below the anchor will be like a link!

Expected Results:  
The text won't be like a link!
Attached file Bug in action! (obsolete) —
The problem is the <a /> is not being seen as closed and just continued. In
XHTML this should be possible.
Attachment #165269 - Attachment mime type: text/html → application/xhtml+xml
Attachment #165271 - Attachment mime type: text/html → application/xhtml+xml
If you write XHTML, you must use the application/xhtml+xml MIME type (or another
XML MIME type), not text/html, which is the HTML MIME type and causes browsers
to use normal HTML parsing.

INVALID.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Sorry you have right, but the bug is still here also if you put 
<meta http-equiv="Content-Type" content="application/xhtml+xml;
charset=UTF-8"/>

and in this case the right parser should work.
Attachment #165269 - Attachment is obsolete: true
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Attached file Corrected version
Marco, note that the element/attribute names are case-sensitive in XML/XHTML.
http://www.w3.org/TR/xhtml1/#h-4.2
(This applies to the stylesheet as well.)

You also need to add the 'xmlns' attribute on the <html> element.
http://www.w3.org/TR/xhtml1/#strict
-> INVALID
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → INVALID
Ok sorry again, but in every cases Firefox color the non-linked text, also with 
your corrected version of the xhtml!

Have you tried it before switch to INVALID?
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Ok I have seen: using .xhtml extension there is no bug, usin .html extension 
with xhtml mime type you have this bug.

Probably firefox's parsers are used with different extension and not with 
different mime type...strange...
The point is in HTML the string "<a/>" is ONLY the start tag, it is NOT
equivalent to "<a></a>". The "/" is IGNORED in HTML. The whole "<a/>" is ONLY
valid in XHTML, and you will only trigger an XHTML parser if you se the right
MIME type (application/xhtml+xml).

Note that the <meta http-equiv="Content-Type"> line is NOT the MIME type, the
MIME type is only decided by what the server sends back (you can change that for
attachments to this bug using the "Type" field of the attachments screen), or,
for local files, by the extension (.html vs .xhtml).
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → INVALID
Also note that on operating systems that allow setting MIME types for local
files (Windows not being amongst these) we use the MIME type set in the
filesystem, not just the extension.

Verified invalid.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: