rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / code / Atom feed
* Why is there quote parsing on queries?
@ 2010-01-28 18:20 Simon Chiang
  2010-01-29 12:45 ` Iñaki Baz Castillo
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Chiang @ 2010-01-28 18:20 UTC (permalink / raw)
  To: Rack Development

Rack currently parses out quoted values such that you get this:

  foo='bar'   # => {"foo" => "bar"}

Rather than this:

  foo='bar'   # => {"foo" => "'bar'"}

I came across this when I was trying to send multiple quoted values
through a text field such that:

  Text Field           Encoded String                  String After
  "'a' 'b'"                %27a%27+%27b%27        "a' 'b"
  " 'a' 'b' "              +%27a%27+%27b%27+    " 'a' 'b' "

It seems confusing because when a user adds spaces, the quotes are
suddenly preserved.  Obviously a user could work around this by
quoting the whole thing (ie "\"'a' 'b'\"") but I just wanted to know
if this is part of the URL specification someplace, or is quote
parsing a convention introduced by rack?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-29 12:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-28 18:20 Why is there quote parsing on queries? Simon Chiang
2010-01-29 12:45 ` Iñaki Baz Castillo

Code repositories for project(s) associated with this inbox:


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).