Last modified: 2010-05-24 19:40:54 UTC
In the HTML source of pages on Wikipedia, I currently see this for section
Notice the newline between the opening <a> tag and the word "edit".
Firefox renders this newline as a space.
This is a trivial thing, but it looks really ugly. :)
I couldn't reproduce the problem myself. I've already checked to see that the
newline isn't in [[MediaWiki:Editsection]]; it isn't.
Probably a tidy issue.
(In reply to comment #1)
> Probably a tidy issue.
And it's also tidy that produces "warning" notices when doing XHTML validation
on this. ;)
Changed summary to reflect that the problem occurs with the rel, title and id
attributes, in addition to href. Also, it seems to occur in most <a> tags, not
just the edit links.
If tidy can't be reconfigured or fixed, the problem could be avoided/reduced by
doing more line-breaks in code, as the issue seems to be that tidy favours
inserting line-breaks within the attribute value just after the opening
quotation mark instead of before the <a> tag (if there is already leading
white-space) or between attributes within the tag.
From http://www.w3.org/TR/xhtml1/#h-4.7 , it seems that browsers should strip
leading white-space from attribute values, so the reported Firefox rendering and
the tidy notifications could be wrong?
(In reply to comment #3)
> From http://www.w3.org/TR/xhtml1/#h-4.7 , it seems that browsers should strip
> leading white-space from attribute values, so the reported Firefox rendering and
> the tidy notifications could be wrong?
See also http://www.w3.org/TR/xhtml1/#C_5 : "Avoid line breaks and multiple
white space characters within attribute values. These are handled inconsistently
by user agents."
Has the problem been fixed? Tidy recently got reconfigured to not wrap lines
[[en:Longest word in English]]
title="Longest word in English">edit</a>]