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. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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}"%> On Thu, Sep 9, 2010 at 11:34 AM, Jamal Soueidan <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote:> 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. > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 On Thu, Sep 9, 2010 at 11:40 AM, radhames brito <rbritom-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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}"%> > > > On Thu, Sep 9, 2010 at 11:34 AM, Jamal Soueidan <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote: > >> 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. >> -- >> Posted via http://www.ruby-forum.com/. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sep 9, 4:34 pm, Jamal Soueidan <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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> I''m missing something out? > > Thanks. > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 > readyhttp://www.railsplugins.org/plugins/257-simple-navigation Looks like there''s a beta of that plugin that might work with Rails 3. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
try reading on html safe feature of rails 3 On Thu, Sep 9, 2010 at 2:00 PM, Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Sep 9, 4:34 pm, Jamal Soueidan <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > > 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 > > > I''m missing something out? > > > > Thanks. > > -- > > Posted viahttp://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.