Re: [htdig3-dev] Bug / missing: client side image maps


Gilles Detillieux (grdetil@scrc.umanitoba.ca)
Tue, 13 Jul 1999 15:49:38 -0500 (CDT)


According to Geoff Hutchison:
>
> On Mon, 12 Jul 1999, Gilles Detillieux wrote:
>
> > I think <link> and <area> handling can be merged together. They both use
> > href, and both add 1 to the hopcount. Correct?
>
> Yup. Got it.

Oops, not quite. I was implying that the buggy <area> code should be dumped,
and <area> could be merged in with the working <link> code, since all this
came up because <area> handling was broken. Here's the fix:

Tue Jul 13 15:36:40 1999 Gilles Detillieux <grdetil@scrc.umanitoba.ca>

        * htdig/HTML.cc (do_tag): Fix handling of <link> and <area>,
        to use href= instead of src=.

Index: htdig/HTML.cc
===================================================================
RCS file: /opt/htdig/cvs/htdig3/htdig/HTML.cc,v
retrieving revision 1.47
diff -u -p -r1.47 HTML.cc
--- htdig/HTML.cc 1999/07/13 01:39:30 1.47
+++ htdig/HTML.cc 1999/07/13 19:58:01
@@ -765,14 +765,16 @@ HTML::do_tag(Retriever &retriever, Strin
         case 22: // area
         case 26: // link
         {
- if (attrs["src"])
+ if (attrs["href"])
             {
- // src seen
+ // href seen
               if (dofollow)
                 {
- delete href;
- href = new URL(attrs["src"], *base);
- retriever.got_href(*href, 0);
+ if (href)
+ delete href;
+ href = new URL(attrs["href"], *base);
+ // area & link are like anchor tags -- one hopcount!
+ retriever.got_href(*href, "", 1);
                   in_ref = 0;
                 }
             }

> > By the way, now that the code is simplified, it would probably make more
> > sense to split up <img> from <embed> & <object>, although it would seem the
> > latter two could be merged with <frame>.
>
> Yes, I'm changing that too.
>
> I'll point out that often whipping up the patch for this is as fast as
> writing the e-mail. ;-)

That would especially be true if I still had write access to the repository! ;-)

$ cvs commit

cvs [server aborted]: "commit" requires write access to the repository
$

> But it brings up the point that people should be
> taking a look at the code. At the moment I'm working on several big
> patches, so it's nice to know people are looking over my shoulders, so to
> speak.

Doin' what I can as time allows. I hope others will do likewise. The more
eyes, the better.

-- 
Gilles R. Detillieux              E-mail: <grdetil@scrc.umanitoba.ca>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
htdig3-dev@htdig.org containing the single word "unsubscribe" in
the SUBJECT of the message.



This archive was generated by hypermail 2.0b3 on Tue Jul 13 1999 - 13:06:51 PDT