That's a good idea pat - I was already doing something similar but
your method is cleaner.

Thanks!

On Nov 25, 10:48 pm, Pat Allan <[email protected]> wrote:
> Hi Colin
>
> That's correct - html_strip is only for indexing. There's nothing  
> built-in to excerpts to remove HTML characters, so you'll need to  
> construct that yourself. Perhaps create another method on your model  
> returning the cleaned version, and then that method can be called from  
> the excerpts object:
>
>    result.excerpts.clean_content
>
> --
> Pat
>
> On 26/11/2009, at 2:29 AM, Colin Ramsay wrote:
>
> > Hi all,
>
> > I have html_strip = 1 set in sphinx.yml, so that carries over to my
> > config file. When I run a search and display an excerpt, I see HTML in
> > the excerpt. This is because the excerpt is generated from my "raw"
> > content which does contain HTML.
>
> > Am I right in thinking that html_strip only affects the indexing
> > process and so won't affect the excerpts? How should I go about
> > creating excerpts that don't have HTML in there?
>
> > Thanks,
> > Colin
>
> > --
>
> > You received this message because you are subscribed to the Google  
> > Groups "Thinking Sphinx" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected]
> > .
> > For more options, visit this group 
> > athttp://groups.google.com/group/thinking-sphinx?hl=en
> > .

--

You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.


Reply via email to