
From: Gilles Detillieux <grdetil@scrc.umanitoba.ca>
To: htdig@htdig.org
Subject: [htdig] Patch

We uncovered a bug back on May 20, in the encodeURL() function.  This
function should encode all non-ascii characters, but right now it doesn't.
I think this is what PR#339 was all about.  Here's the fix:

--- htdig-3.1.2/htlib/URLTrans.cc.orig	Tue Feb 16 23:03:56 1999
+++ htdig-3.1.2/htlib/URLTrans.cc	Wed Jun  2 08:29:05 1999
@@ -75,7 +75,7 @@ void encodeURL(String &str, char *valid)
 
     for (p = str; p && *p; p++)
     {
-	if (isdigit(*p) || isalpha(*p) || strchr(valid, *p))
+	if (isascii(*p) && (isdigit(*p) || isalpha(*p) || strchr(valid, *p)))
 	    temp << *p;
 	else
 	{


