Well, Gilles, you were right on both counts.

I was running the original versions of htdig and htsearch, not the newly
compiled ones.

Ahh, at least I can say I'd actually found the right line to change!  Though
I'd have not likely figured out the subtleties of translate_lt_gt on my own.

Works like a charm.  Actually, it's quite snappy as the META doesn't break
any HTML rules (I know of).

Thanks for your help, and particularly your patience.

Cheers,

Patrick.

patrick jennings                      synaptic § grey matter media
    [EMAIL PROTECTED]
    eJournal Travelogue :: http://synaptic.bc.ca
    Fine Art & Travel Photographs :: http://greymattermedia.com
    Prisoners ~ A New Play :: http://greymattermedia.com/prisoners


----- Original Message -----
From: Gilles Detillieux <[EMAIL PROTECTED]>
To: Patrick Jennings <[EMAIL PROTECTED]>
Cc: Gilles Detillieux <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Monday, February 19, 2001 2:54 PM
Subject: Re: [htdig] Putting HTML in the META description


> According to Patrick Jennings:
> > > > This behaviour is odd on two levels:
> > > >
> > > >     1) It not only replaces the <, > and " characters with entities
> > >
> > > Well, the only explanation I can see is that it's still doing the SGML
> > > encoding on your meta description.  Are you sure you are using the
> > > patched htsearch, and not an older one?  If you added the if()
statement
> > > as I suggested, did you perhaps forget the "!"?
> >
> > Yep.  That was my own response, so I double checked, re-compiled,
> > re-ran...same result.
> >
> > My initial attempt, before receiving your email, was to comment the SGML
> > call out altogether, also with the same result.
> >
> > The release for Display.cc is:
> >
> > #if RELEASE
> > static char RCSid[] = "$Id: Display.cc,v 1.54.2.27 2000/02/17 16:46:25
> > grdetil Exp $";
> > #endif
>
> Yes, that's the release ID for ht://Dig 3.1.5's Display.cc source.
> At least that much is correct.  You say "re-compiled, re-ran...",
> but not re-installed.  How are you re-running htsearch?  Are you
> running it straight from the source tree, at the command line?
> (e.g. htsearch/htsearch "words=...")  If not, then you're almost certainly
> still running the old one.  I can't see any other explanation for the
> SGML encoding still occurring.
>
> > Perhaps it has something to do with how HTML.cc treats META values?  The
> > changes you've specified below change this behaviour.
> >
> > > When HTML.cc finds the start of a tag (the "<" character), it searches
> > > for the next ">" which it takes as the ending.  That next ">" is
inside
> > > the content of your meta tag.  It's a violation of the HTML standard
> > > to embed a ">" (or a "<" for that matter) inside an HTML tag, so your
> > > <META NAME="htdig-description" ... > tag above is invalid.  You'd need
to
> > > SGML-encode the embedded "<" and ">" as &lt; and &gt; to get that to
work.
> > > You'll also need to set translate_lt_gt to true in your htdig.conf,
> > > for them to get translated.
> > >
> >
> > Closer.  When I do this, the line is no longer truncated.  However,
'&lt;'
> > becomes '&amp;lt;' in the search template.  EG:
> >
> > <dl><dt><strong><a
> > href="http://www.greymattermedia.com/algtr001.htm">Suitable for Framing
:: -
> > Respite at Alligator Creek -</a></strong><img src="/htdig/star.gif"
> > alt="*"><img src="/htdig/star.gif" alt="*"><img src="/htdig/star.gif"
> > alt="*"><img src="/htdig/star.gif" alt="*">
> > </dt><dd>&amp;lt;IMG align=left width=192 height=192
> > SRC=&quot;http://www.greymattermedia.com/images/algtrs01.jpg&quot;
> > align=TEXTTOP HSPACE=5 VSPACE=0 BORDER=0
> > ALT=&quot;<strong>Alligator</strong> Creek National
Park&quot;&amp;gt;Water
> > and time collaborate to create a fanciful waterway. ::
> > <strong>Alligator</strong> Creek National Park, Queensland<b><tt>
> > ...</tt></b><br>
> > <i><a
> >
href="http://www.greymattermedia.com/algtr001.htm">http://www.greymattermedi
> > a.com/algtr001.htm</a></i>
> >  <font size="-1">02/19/01, 15406 bytes</font>
> > </dd></dl>
>
> For this to happen, there must be two things occurring.  1) htdig is not
> translating the &lt; and &gt; to their decoded values, so it's not getting
> the "translate_lt_gt: true" from your config file, and 2) htsearch is
still
> tranlating the &, > and < to their encoded values, so your changes have
not
> been taking effect.
>
> > Obviously, I need to find out where this is happening.  Sorry for the
c++
> > tutorial request--too many years since I coded in a unix
environment--but
> > how do I set the debug level when 'make'ing, and where does output sent
to
> > cout go?
>
> I don't think there are any compile-time debuggin options.  You set the
> debug level at run time with one or more -v options to htdig or htsearch.
> cout goes to the same file descriptor as stdout, and cerr goes to the same
> file descriptor as stderr.
>
> --
> Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
> 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
>
> _______________________________________________
> htdig-general mailing list <[EMAIL PROTECTED]>
> Information: http://lists.sourceforge.net/lists/listinfo/htdig-general
> FAQ: http://htdig.sourceforge.net/FAQ.html
>


_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
Information: http://lists.sourceforge.net/lists/listinfo/htdig-general
FAQ: http://htdig.sourceforge.net/FAQ.html

Reply via email to