From the source...

module WhiteListHelper
 ...
 mattr_reader :tags, :attributes, :protocols
 @@tags         = %w(strong em b i p code pre tt output samp kbd var
sub sup dfn cite big small address hr br div span h1 h2 h3 h4 h5 h6 ul
ol li dt dd)
 ...
end

That's a reader not an accessor, so I guess it won't really work
anywhere unless I'm missing something... I think just changing that
mattr_reader to mattr_accessor would do the trick. I'm going to try it
out and see :-)

On 10/3/06, Patrick Crowley <[EMAIL PROTECTED]> wrote:
Yeah, that looks interesting, Nick.

One thing I didn't get, though. In the README, he says you can modify
the whitelist with this:

> WhiteListHelper.tags += %w(table td th)

Where does that go? I've tried putting it in my application
controller, helper, individual models, and even environment.rb -- but
no dice.

Best,
Patrick


On Oct 2, 2006, at 5:57 pm, Nick Zadrozny wrote:

> Sounds like a nice place for a whitelist. Rick Olson wrote a handy
> whitelist plugin for Rails. If you whitelist your textilized/gsubbed
> output, it could prove more flexible in the long run if you ever
> decide to change what tags are and aren't allowed.
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby



--
Nick Zadrozny
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to