works nicely, especially once I worked out you could say:
  Sanitize.clean(html, :remove_contents => ['script'])
- otherwise it includes inline javascript in the cleaned text.

I might need to use nokogiri first to remove particular divs with
"display=none" in them - but that's not too painful.

Thanks to both the folks who suggested this!

- Korny

On Thu, Apr 22, 2010 at 5:13 PM, Matthieu Stone <[email protected]>wrote:

> sanitize might be useful  :: based upon nokogirri
>
> http://wonko.com/post/sanitize
>
>
>
> On 22 April 2010 17:05, Richard Heycock <[email protected]> wrote:
>
>> Excerpts from Dan Cheail's message of 2010-04-22 10:31:01 +1000:
>> > I'd say nokogiri or Hpricot (http://hpricot.com/) would be your best
>> bets.
>>
>> I would avoid Hpricot. nokogiri is faster and actively maintained. It
>> does seem that Ola Bini is doing some work on it but it doesn't seem
>> to be much.
>>
>> rgh
>> --
>> Richard Heycock
>>
>> http://topikality.com
>>
>> +61 (0) 410 646 369
>> [e]:  [email protected]
>> [im]: [email protected]
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ruby or Rails Oceania" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<rails-oceania%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/rails-oceania?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Ruby or Rails Oceania" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rails-oceania%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rails-oceania?hl=en.
>



-- 
Kornelis Sietsma  korny at my surname dot com
kornys on twitter/fb/gtalk/gwave www.sietsma.com/korny
"Every jumbled pile of person has a thinking part
that wonders what the part that isn't thinking
isn't thinking of"

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" 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/rails-oceania?hl=en.

Reply via email to