Closed Bug 2756 Opened 26 years ago Closed 26 years ago

Line breaks within ALT text rendered as box-like char ( )

Categories

(Core Graveyard :: Viewer App, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: elig, Assigned: rickg)

References

()

Details

* TITLE/SUMMARY
Line breaks within ALT text rendered as box-like char ()

* STEPS TO REPRODUCE
0) Launch Viewer
1) Load http://www.prometheus-music.com/gecko/bug694a.html [included below as
'HTML SNIPPET']

* RESULT
 - What happened

Text rendered in ALT test is linebreak.

 - What was expected

Behavior equivalent to IE 4.0 or Comm 4.5, unless this behavior is specified in
the HTML 4 spec. (I don't see anything in 13.8, "How to specify alternate text".)


* REGRESSION

 - Occurs On
        viewer (1.27.99 optimized build for Mac OS)
        viewer (1.27.99 optimized build for Win32 [NT 4, Service Pack 3])
        viewer (1.27.99 optimized build for Linux)

 - Doesn't Occur On
        Communicator 4.5 (RTM build tested on Mac OS)
        IE 4.0 (Win32; displays an actual line break in the alt text)

* HTML SNIPPET

<img src="bla.gif" width=200 height=200 alt="line
break">

* CONFIGURATIONS TESTED

- [Mac] Power Mac 8500/120 (233 Mhz 604e), 64 MB RAM (VM on; 1 MB of VM used),
1024x768 (Thousands of Colors), Mac OS 8.5.1

- [Win32] Vectra VL (233 Mhz P2), 96 MB RAM, 800x600 (True Color), NT 4.0 SP3.

- [Linux] Vectra VL (266 Mhz P2), 32 MB RAM (blech).
[Communicator 4.5 displays the text as 'linebreak', filtering out the line break
character entirely.]
Status: NEW → ASSIGNED
I would recommend that you treat the line break character as a space rather
than nothing at all.

That way, this code snippet's alt text:

   <img src="bla.gif" width=200 height=200 alt="this is
   some text">

...would be rendered as "this is some text" not "this issome text".

This should apply to *all* textual attributes, including "title", "alt",
"summary", etc.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
I see this is Resolved/Fixed, but what are the expected results? [i.e. treat line
break as a space, or yank 'em out, or...?]

Anyway, I'll verify irregardless, but it would help to know.
Status: RESOLVED → REOPENED
Re-opening bug. Checked 2.1.99 build on Mac OS, Win32 and Linux.

On Linux, a Yen character is displayed instead of the character-not-available
box.

On Win32 and Mac, I concur with py8ieh's suggestion that inserting a space
between words separated by a line break rather than a space makes much more
sense, rather than simply concatenating the two words together into a single
word. (Which IE 4 already does.)

Thus, re-opened for Linux fix, and to request consideration for py8ieh's
suggestion.
Resolution: FIXED → ---
Oops. I meant:

"...concur with py8ieh's suggestion that inserting a space between words
separated by a line break makes much more sense than simply concatenating the two
words together into a single word."
Setting all current Open/Normal to M4.
Here is what HTML4 spec says about the contents of CDATA attributes such as
alt, title, href, longdesc...:

CDATA is a sequence of characters from the document character set and
may include character entities. User agents should interpret attribute
values as follows:
 o Replace character entities with characters,
 o Ignore line feeds,
 o Replace each carriage return or tab with a single space.
User agents may ignore leading and trailing white space in CDATA attribute
values (e.g., "   myval   " may be interpreted as "myval").

                      from http://www.w3.org/TR/REC-html40/types.html#h-6.2
"It's not just a good idea, it's the spec!" (thanks!)
Status: REOPENED → RESOLVED
Closed: 26 years ago26 years ago
Resolution: --- → FIXED
I think this is fixed now. Please verify.
Hmm....not fixed in 2.12.99 Mac OS build, but will hold for 2.16.99 cross-
platform builds and verify or re-open.
Status: RESOLVED → VERIFIED
Verified fixed using:

	- 2.18.99 Mac OS build
	- 2.18.99 Win32 build
	- 2.22.99 Linux build

[Mac OS & Linux builds have text replaced with a broken image upon resize; will
write up a separate bug if one doesn't exist.]

Thanks!
[Side issue covered by bug #2723.]

Also, checked a small number of other instances of CDATA attributes (thanks
py8ieh!), and didn't observe line break handling problems.
This bug is one of many related to alternate text of images. All these bugs
have been marked. To find related bugs, search the description field for the
string "[ALT]".
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.