Re: [htdig] Newlines in $(EXCERPT) result from htsearch?


Subject: Re: [htdig] Newlines in $(EXCERPT) result from htsearch?
From: Gilles Detillieux (grdetil@scrc.umanitoba.ca)
Date: Wed Jul 26 2000 - 09:50:06 PDT


According to Hunter Morris:
> I'm using PHP4 to parse the results of htsearch, and everything works to
> near perfection. However, some excerpts that I've gathered thusfar have
> newlines in them which throws my PHP wrapper off.

Funny how problems seem to happen in clusters. Here's a response I posted
to the htdig3-bugs list just a couple weeks ago, in response to PR#864:

Subject: Re: meta description (PR#864)
To: dean@avroom.barton.ac.uk
Date: Thu, 6 Jul 2000 15:34:06 -0500 (CDT)
Cc: ht3bugs@htdig.org, htdig3-bugs@htdig.org

According to dean earley (dean@avroom.barton.ac.uk):
> HTDig leaves newlines characters in the meta description.
>
> I have a PHP script which parses the output line by line, and this description
> messes up the order

Try adding

    head_string.replace('\n', ' ');

just before the "encodeSGML(head_string);" statement in Display::excerpt(), in
htsearch/Display.cc.

-- 
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-unsubscribe@htdig.org You will receive a message to confirm this.



This archive was generated by hypermail 2b28 : Tue Jul 25 2000 - 23:48:27 PDT