Comments (4)
The #query_values
is meant to decode application/x-www-form-urlencoded
query strings. It does some other stuff as well, and it could probably be argued that that is a mistake, but regardless, if you look at application/x-www-form-urlencoded
, you'll see that the +
character is supposed to be treated as a space in that context. It's one of the more misguided bits of behavior that have found their way into a spec, but it's in the spec and we have to live with it. The work-around is to %-encode the +
character. #query_values
will not replace the +
character with a space if it was %-encoded first.
I've implemented based on the definition in HTML 4.01, however, I intend to rewrite in the next major version against the definition in HTML5 as it's far less ambiguous and it's what will be implemented in most major browsers going forward:
http://www.w3.org/TR/html5/association-of-controls-and-forms.html#application-x-www-form-urlencoded-encoding-algorithm
from addressable.
Actually, the part I'm unclear on is that the + that's being decoded into a space is one that was already % escaped.
from addressable.
Oooooh, my bad. Yes, this was recently resolved — could you check out master and verify that it's fixed for you there?
from addressable.
Yup. Looks good. Thanks!
from addressable.
Related Issues (20)
- Fuzz test for parse/to_s round-trip
- Day HOT 5
- Dependabot couldn't find a Gemfile HOT 3
- Templates doesn't handle IPv6 IPs
- Invalid scheme format for ssh URL HOT 4
- Is it intended that `normalized_path` destroys the trailing dot when it's the only char? HOT 1
- Improve pure ruby IDNA implementation to match browsers behavior (IDNA2008 and UTS#46) HOT 3
- Equivalent of `URI.regexp(schemes)`? HOT 4
- Crypto mining
- undefined method `to_str' for :id:Symbol (NoMethodError) in 2.8.2 HOT 8
- Template expansion does not work with symbolized hashes in 2.8.1 HOT 1
- Update to 2.8.2 break test env HOT 1
- Any version after 2.8.1 causes errors in our test suite coming from addressable. HOT 8
- Drop support for Ruby 2.2 (and more?) HOT 3
- Disallow backtick in host HOT 1
- Normalize errors when trying to run a simple url normalize HOT 4
- Unsafe concurrent Hash access HOT 9
- k
- feed:http: crashes servers HOT 11
- Valid domain not parsing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from addressable.