11155
(-- --)
September 9, 2010, 3:34pm
1
Hello,
Is there any configuration in Rails 3 since it destroy my HTML when i
try to print something out ?
Example:
<%= navigation [{:users => admin_users_path}] %>
<ul class="navigation">
<li class=""><a
href="/admin/users">users</a></li>
</ul>
I have taken those from view source, why is this happening in Rails 3?
I'm missing something out?
Thanks.
what is navigation??? because i bet is not an object, so rails thinks is html and is scaping it, if navigation is text the way to do it is
<%=“navigation #{:users => admin_users_path}”%>
are you using simple navigation ?? in that case navigation [{:users => admin_users_path}] is a method but it looks like the gem is not rails 3 ready
go to http://www.railsplugins.org/ and see if the gem/plugin is rails 3 ready
Hello,
Is there any configuration in Rails 3 since it destroy my HTML when i
try to print something out ?
Example:
<%= navigation [{:users => admin_users_path}] %>
<ul class="navigation">
<li class=""><a
href="/admin/users">users</a></li>
</ul>
I have taken those from view source, why is this happening in Rails 3?
Sounds like you should read about the xss protection that is in rails
3 (and rails 2.3.6 if my memory is correct) - rails knows about
strings that should be escaped and strings that shouldn't, if you
write your own view helpers you occasionally need to tell rails that a
string is safe so that it doesn't escape it for you
Fred
11155
(-- --)
September 9, 2010, 7:09pm
5
radhames brito wrote:
are you using simple navigation ?? in that case navigation [{:users =>
admin_users_path}] is a method but it looks like the gem is not rails 3
ready
go to http://www.railsplugins.org/ and see if the gem/plugin is rails 3
ready
http://www.railsplugins.org/plugins/257-simple-navigation
Looks like there's a beta of that plugin that might work with Rails 3.
try reading on html safe feature of rails 3