Hi,
I hope this is not something which someone else already brought up.
If one reads the HTML standard carefully, one would find out that
<img src="foo" alt="">
and
<img src="foo">
mean different things. For the first, the author of the page has
made a conscious decision and decided that the image is irrelevant
to text/speech-based browsers; for the second, the author forgot
about the issue entirely (or does not know that text browsers exist,
or does not care about us).
Currently, w3m treats both cases identically, and whether a filename
is displayed is dependant on an option setting.
The following patchlet (relative to 0.11-pre) will modify w3m's
behaviour so that it will never treat the second case as an implicit
alt="", so that it will always display the file name for the second
case. This would make w3m's behaviour more in line with lynx, and
also make reading some of the poorly constructed web sites easier.
--- file.c.bak Sun Sep 10 22:36:00 2000
+++ file.c Sun Nov 12 00:06:59 2000
@@ -1805,7 +1805,7 @@
for (t = targ; t; t = t->next) {
if (strcasecmp(t->arg, "src") == 0 && t->value)
p = t->value;
- else if (strcasecmp(t->arg, "alt") == 0 && t->value)
+ else if (strcasecmp(t->arg, "alt") == 0)
q = t->value;
else if (strcasecmp(t->arg, "width") == 0 && t->value)
w = atoi(t->value);
@@ -1874,7 +1874,7 @@
goto img_end1;
}
}
- if (!ignore_null_img_alt) {
+ if (!ignore_null_img_alt && q != NULL) {
/* XXX */
Strcat_charp(tmp, "</img_alt>");
goto img_end1;
-- óÕ ¼ß±É <acli@ada.dhs.org> http://trends.ca/~acli/ ALARMED? RAISE THE ALARM! http://www.adbusters.org/contest/ "A good style should show no sign of effort; what is written should seem a happy accident." -- Somerset Maugham.
This archive was generated by hypermail 2b29 : Sun Nov 12 2000 - 00:18:44 CST