Closed Bug 267826 Opened 20 years ago Closed 20 years ago

Whitespace after closing anchor tag incorrectly included as part of anchor

Categories

(Firefox :: General, defect)

1.0 Branch
x86
Linux
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: jcw1001, Assigned: bugzilla)

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041020 Firefox/0.10
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041020 Firefox/0.10

If an anchor includes an image, and the close tag is on a new line, and there's
whitespace after the closing anchor, that whitespace is treated as part of the
anchor.

Reproducible: Always
Steps to Reproduce:
1. Go here: http://www.w3schools.com/html/tryit.asp?filename=tryhtml_imglink
2. After closing anchor tag </a>, type " firefox", yes, there IS a space before
the word firefox
3. Click on the button that says Edit the text and click me
Actual Results:  
Between the image and the word firefox, the space is underlined and treated as
part of the link.

Expected Results:  
The space shouldn't be part of the link.

Set severity as major as the presentation of the page is extremely distracting
and out of place.

Note: only occurs when closing anchor tag on a new line from image tag.
That is not the whitespace you are looking for.
  - Remove the space you added before the word "firefox", no change;
  - Remove the linefeed between <img...> and </a>, space in link goes away.
As for why the space in link doesn't appear without non-space text between </a>
and </p>, dunno, perhaps a quirks mode thing
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
(In reply to comment #1)
> That is not the whitespace you are looking for.
>   - Remove the space you added before the word "firefox", no change;
>   - Remove the linefeed between <img...> and </a>, space in link goes away.
> As for why the space in link doesn't appear without non-space text between </a>
> and </p>, dunno, perhaps a quirks mode thing

What is quirks mode?

The space in the link shouldn't be there, and </a> being on a newline shouldn't
cause it either.  From what I understand of your comments, you CAN reproduce
this problem, so how is this not a bug?
Version: unspecified → 1.0 Branch
quirks mode is where mozilla emulates various quirky behaviours of popular past
browsers for non-standards-compliant pages, see
<http://www.mozilla.org/docs/web-developer/quirks/>. You can see if it is in
effect on a page from Page Info on the context menu (or This Frame > Frame info
in this case.

Newline is whitespace. Whitespace sequences become a space in html.
You need to log in before you can comment on or make changes to this bug.