#10336 closed defect (invalid)
[patch][cla]dojo.hash doesn't set "trailingSpace " as the hash correctly
Reported by: | miksago | Owned by: | Rob Retchless |
---|---|---|---|
Priority: | high | Milestone: | 1.4 |
Component: | General | Version: | 1.4.0b |
Keywords: | Cc: | Rob Retchless | |
Blocked By: | Blocking: |
Description
I've been working through writing better test cases for dojo.hash (#10003), and I've noticed that in the test case of setting a hash to a string with a trailingSpace that it isn't being set correctly.
dojo.hash('test '); dojo.hash(); // should return "test "
Currently dojo.hash("test "); will set the hash to "test " instead of "test%20" which seems to be causing the test to fail in FF3.5
Attachments (1)
Change History (7)
Changed 11 years ago by
Attachment: | hash.diff.js added |
---|
comment:1 Changed 11 years ago by
Milestone: | tbd → 1.5 |
---|---|
Owner: | changed from anonymous to Rob Retchless |
Standard practice is to comment out the assert until we get it working. You can put in a reference to this ticket.
comment:2 Changed 11 years ago by
The only reason the assert is in there was that it was in the original tests, but written incorrectly / inconsistently.
comment:3 Changed 11 years ago by
Milestone: | 1.5 → 1.4 |
---|---|
Summary: | dojo.hash doesn't set "trailingSpace " as the hash correctly → [patch][cla]dojo.hash doesn't set "trailingSpace " as the hash correctly |
comment:4 Changed 11 years ago by
@miksago, this is actually behaving as expected. We decided to leave encoding up to the user to enable query-like hashes. If we did an explicit encodeURIComponent on every call, dojo.hash("param=blah¶m2=blah2") would be encoded as "param%3Dblah%26param2%3Dblah2" - ugly. This is documented here: http://docs.dojocampus.org/dojo/hash#advanced
comment:5 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:6 Changed 11 years ago by
Okay, in that case, we'll need to note that dojo.hash() trims #'s from the start of urls, and spaces from the end of urls.
Proposed patch