ruby on rails 3 - Looking for a override of SafeBuffer -


i reading katz's safe buffer article while trying upgrade our side rails 3. have lot of helpers build complex html/css bits data know safe (we're doing things large menus).

unfortunately - if i'm reading katz's article right - seems need mark html_safe or escaped.

i'm wondering if has come simple hack turn functionality off on module/method/block level yet? looking @ code in rails , doesn't trivial override.

i believe have couple "easy" solutions:

  1. modify helpers hand return html_safe'd strings
  2. iterate on methods (module?) , use alias alias them to, say, _unsafe_helper_name, , have helper_name return _unsafe_helper_name.html_safe
  3. use raw method in views. calling raw on output turns off rails 3's built in protection , outputs string no escaping.

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -