rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: "Iñaki Baz Castillo" <ibc@aliax.net>
To: rack-devel@googlegroups.com
Subject: Re: Why is there quote parsing on queries?
Date: Fri, 29 Jan 2010 13:45:47 +0100	[thread overview]
Message-ID: <cc1f582e1001290445y6315163co56451eb795aa6149@mail.gmail.com> (raw)
In-Reply-To: <2d67024e-41cd-493b-838d-cf06cf4b64ce@g28g2000prb.googlegroups.com>

2010/1/28 Simon Chiang <simon.a.chiang@gmail.com>:
> 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
> Parsing
>  "'a' 'b'"                %27a%27+%27b%27        "a' 'b"
>  " 'a' 'b' "              +%27a%27+%27b%27+    " 'a' 'b' "

IMHO this is a bug in Rack.
Usually parameters can contain a non double quoted string value or a
double quoted string value (or no value).
In case the parameter value contains single quote (') it should be
treated as any other char into a string and shouldn't be stripped out.


-- 
Iñaki Baz Castillo
<ibc@aliax.net>

      reply	other threads:[~2010-01-29 12:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-28 18:20 Why is there quote parsing on queries? Simon Chiang
2010-01-29 12:45 ` Iñaki Baz Castillo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cc1f582e1001290445y6315163co56451eb795aa6149@mail.gmail.com \
    --to=rack-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).