Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #8307 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Plus sign in path not returned as space through param call

Reported by: jugend Assigned to: bitsweat
Priority: normal Milestone: 1.x
Component: ActionPack Version: edge
Severity: normal Keywords:
Cc:

Description

Example accessing: http://hostname/tags/web+development

Calling params[:tag_name] returns 'web+development' instead of 'web development'.

Change History

05/12/07 04:50:37 changed by ulysses

  • owner changed from core to bitsweat.

05/12/07 05:08:51 changed by bitsweat

  • status changed from new to closed.
  • resolution set to invalid.
  • milestone set to 1.x.
URI.unescape('+') == '+'
CGI.unescape('+') == ' '

Path parameters are URI escaped; query parameters are CGI escaped.

Use %20 for spaces in path parameters.

Unfortunately #7544 broke URI escaping behavior.

05/12/07 05:23:21 changed by jugend

Thanks bitsweat, but why named route url return '+' instead of '%20'?

Example: map.tags '/tags/:tag_name', :controller => 'tags' tags_url(:tag_name => 'web development')

Shouldn't it be consitent and return '%20'?

Thanks.

05/12/07 05:32:45 changed by jugend

Sorry, just ignore my previous silly question, I guess, best is to change space with underscore. Thanks.

05/14/07 11:14:34 changed by bitsweat

  • resolution changed from invalid to fixed.

(In [6730]) Rationalize route path escaping according to RFC 2396 section 3.3. Closes #7544, #8307.