Hey everyone, I am using the routes globbing in rails 3.0.9 There when I add at any url a *anything at the end, the rest of the url should be contained in the params[:anything] filed. some_url_route/*anything This is true and also works for most of the special characters like $, ^, @ ect... However, it is not working for the pound key ''#'' The string simply stops at this symbol. I can escape this by escaping the # with %23. However, this is not what I want. I really want users to be able to put the # key into the string! Does anyone know if this behaviour of rails is on purpose and if there is any other workaround other than using %23?? Thanks a lot for your help, Karen -- 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 Aug 5, 12:45 pm, Karen <karensc...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> Hey everyone, > > I am using the routes globbing in rails 3.0.9 > There when I add at any url a *anything at the end, the rest of the > url should be contained in the params[:anything] filed. > > some_url_route/*anything > > This is true and also works for most of the special characters like $, > ^, @ ect... > However, it is not working for the pound key ''#'' > The string simply stops at this symbol. > I can escape this by escaping the # with %23. > However, this is not what I want. I really want users to be able to > put the # key into the string! > Does anyone know if this behaviour of rails is on purpose and if there > is any other workaround > other than using %23?? >This isn''t really a rails thing. The bit after the # is known as the fragment and isn''t sent by the browser to the server at all Fred -- 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.
On Fri, Aug 5, 2011 at 4:45 AM, Karen <karenschom-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> However, it is not working for the pound key ''#''As Fred says -- works as designed :-) I suggest if you''re developing web apps you should be familiar with -- that is, have *read* -- http://www.w3.org/Protocols/rfc2616/rfc2616.html FWIW, -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- 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.
Sure I know about this, but there are other special characters which normally need to be escaped in URL''s as well and these are forwarded by rails well enough, that''s why I was wondering. Anyhow thanks for lecturing ;) On Aug 5, 4:19 pm, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Fri, Aug 5, 2011 at 4:45 AM, Karen <karensc...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > However, it is not working for the pound key ''#'' > > As Fred says -- works as designed :-) > > I suggest if you''re developing web apps you should be familiar with -- > that is, have *read* -- > > http://www.w3.org/Protocols/rfc2616/rfc2616.html > > FWIW, > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe80Tx58lXaADg@public.gmane.org://about.me/hassanschroeder > twitter: @hassan-- 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.
Karen wrote in post #1015150:> Sure I know about this, but there are other special characters which > normally need to be escaped in URL''s as well > and these are forwarded by rails well enough, >Is it your belief that users enter their urls in a rails app? -- 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.