[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with htdig 3.1.3




There's a problem with the latest version of htdig and CGI params which
makes indexing/searching most of the pages on our site.  Oops!  Anyways,
rumor has it that there's a patch, which fixes this:

-----8<--------8<--------8<--------8<--------8<---

*** HTML.cc~ Sun Sep 26 18:05:07 1999 
--- HTML.cc Sun Sep 26 18:43:53 1999 
*************** 
*** 1113,1122 **** 
      convert = 0; 
      while (*text) 
      { 
! if (*text == '&') 
! convert << SGMLEntities::translateAndUpdate(text); 
! else 
! convert << *text++; 
      } 
      return convert.get(); 
  } 
--- 1113,1127 ---- 
      convert = 0; 
      while (*text) 
      { 
! if (*text == '&') 
! { 
! convert << SGMLEntities::translateAndUpdate(text); 
! if( !strncmp(text,"amp;",4) ) 
! text += 4; 
! } 
! else 
! convert << *text++; 
      } 
      return convert.get(); 
  } 

*** SGMLEntities.cc~ Sun Sep 26 18:30:53 1999 
--- SGMLEntities.cc Sun Sep 26 18:39:28 1999 
*************** 
*** 165,171 **** 
      } 
      else 
      { 
! return ' '; // Unrecognized entity. Change it into a 
space... 
      } 
  } 
   
--- 165,171 ---- 
      } 
      else 
      { 
! return '&'; // Unrecognized entity. Return just an 
ampersand... 
      } 
  } 
   
*************** 
*** 280,284 **** 
       
      if (*entityStart == ';') 
        entityStart++; // A final ';' is used up. 
! return translate(entity); 
  } 
--- 280,287 ---- 
       
      if (*entityStart == ';') 
        entityStart++; // A final ';' is used up. 
! unsigned char e = translate(entity); 
! if( e == '&' && !translate_amp ) 
! entityStart = orig + 1; // Catch unrecognized entities... 
! return e; 
  } 

-----8<--------8<--------8<--------8<--------8<---

Anyways, anyone who is doing any search engine development should apply
this patch to their local system.  I'll apply it to the dev server
today/tonight as time permits.  

--
Aaron Turner, Core Developer       http://vodka.linuxkb.org/~aturner/
Linux Knowledge Base Organization  http://linuxkb.org/
Because world domination requires quality open documentation.