
From grdetil@scrc.umanitoba.ca Wed Feb 24 11:12:53 1999
Date: Wed, 24 Feb 1999 12:41:13 -0600 (CST)
From: Gilles Detillieux <grdetil@scrc.umanitoba.ca>
To: htdig@htdig.org
Cc: grdetil@scrc.umanitoba.ca, htdig@htdig.org
Subject: Re: [htdig] Meta description tags


According to Frank Richter:
> I think this elimination of the other TITLE tags is a good thing.
> Some users here include a full HTML doc within a <NOFRAME> tag and have
> then a second TITLE in the whole document.
> 
> - Frank
> 
> > This should make any additional titles be indexed just like regular text.

OK, here it is in patch form, to be applied to the 3.1.1 source.  Brett
said it worked fine for him.  I assume he inserted the code I gave him
just like this:

--- htdig/HTML.cc.titlebug	Tue Feb 16 23:03:52 1999
+++ htdig/HTML.cc	Wed Feb 24 12:36:59 1999
@@ -388,11 +388,20 @@ HTML::do_tag(Retriever &retriever, Strin
     switch (which)
     {
 	case 0:		// "title"
+	    if (title.length())
+	    {
+		if (debug)
+		    cout << "More than one <title> tag in document!"
+			 << " (possible search engine spamming)" << endl;
+		break;
+	    }
 	    in_title = 1;
 	    in_heading = 1;
 	    break;
 			
 	case 1:		// "/title"
+	    if (!in_title)
+		break;
 	    in_title = 0;
 	    in_heading = 0;
 	    retriever.got_title(title);


-- 
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 htdig mailing list, send a message to
htdig@htdig.org containing the single word "unsubscribe" in
the SUBJECT of the message.
