Closed Bug 132252 Opened 22 years ago Closed 22 years ago

multilined <img> alt/title attribute

Categories

(SeaMonkey :: General, defect)

x86
Windows 2000
defect
Not set
minor

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 67127

People

(Reporter: greg, Assigned: asa)

Details

(Keywords: testcase)

Attachments

(1 file)

If you insert *real* linefeeds in the alt attribute of the img tag, ie (6 afai 
tested) will display it on multiple lines. That is probably not wanted 
behaviour anyway, but the problem is that when that happens, Mozilla displays 
strange square where those linefeeds are, and if the file was edited in dos 
environment, you also get a note icon(yes, the musical thingie) with those 
squares... (due to \n\l or something i guess)
See attached file.
Attached file testcase html file
Confirming W2K 2002031104: I see strange characters in the place of newlines in
the tooltips for the images with title attributes. In the case of the broken
image, I see the alt text on one line, which I think is correct behaviour.

http://www.w3.org/TR/html4/types.html#type-cdata sez:
User agents should interpret attribute values as follows: [...] Ignore line feeds

Therefore, I think these newlines not be shown. For 'nice' behaviour, they
should be replaced with a space, otherwise we'll get things like 'hellothis isa
test'.

Severity -> minor, though.

harishd, moied, should the component be Parser?

Can anyone confirm this on a non-Windows system? If so, please change Platform
and OS accordingly.

I've just tried it in IE5.5 and it shows newlines as newlines in both tooltips
and the placeholder for the missing image - not that this is necessarily the
correct behaviour :-)
Severity: major → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
0.9.9 on Mac OS X is exhibiting this behavior as well. (I cannot change the
platform, however.) The newline characters look to me like the delete characters
on old IBM electric typewriters. Quite odd. :-)

Is there any particular reason we need to prevent users from providing
multi-line title attributes?
If only I had waited. :-)

HTML 4.01 says that in this case we should:

  o Replace character entities with characters,
  o Ignore line feeds,
  o Replace each carriage return or tab with a single space.

http://www.w3.org/TR/html4/types.html#type-cdata

*** This bug has been marked as a duplicate of 67127 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
v
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: