#134 ✓resolved

strip html tags before indexing

Reported by Jens | February 13th, 2010 @ 12:43 AM

I added this to the [[InstanceMethods]] module to get access to the Rails "strip_tags" function:

    def help

    class Helper
      include Singleton
      include [[ActionView]]::Helpers::TextHelper

Then tweaked the "to_doc" instance method:

        unless config[:ignore]
          text = self.send("#{field}_to_ferret")
          text = help.strip_tags(text) unless text.blank?
          doc[field] = text

I'm sure there's a more elegant way to do this, but thought i'd pass it on.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket