# separator escaping in path generation

**URL:** <https://discuss.rubyonrails.org/t/separator-escaping-in-path-generation/23065>\
**Category:** rubyonrails-core\
**Created:** [January 12, 2008, 2:17am UTC](https://discuss.rubyonrails.org/t/separator-escaping-in-path-generation/23065 "2008-01-12T02:17:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fxn](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/fxn/32/12956_2.png) [@fxn](https://discuss.rubyonrails.org/u/fxn)\
**Post date:** [January 12, 2008, 2:17am UTC](https://discuss.rubyonrails.org/t/separator-escaping-in-path-generation/23065/1 "2008-01-12T02:17:13Z")

</div>

Path generation does not escape URI reserved characters nor dots. (It escapes "%"s though.)

Route recognition correctly unescapes after separators are found, I think that's thanks to

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[http://dev.rubyonrails.org/ticket/7544](http://dev.rubyonrails.org/ticket/7544)

But, to give an extreme example, if I say

&nbsp;&nbsp;&nbsp;url\_path

and Url#to\_param outputs a URL, I'd expected that to have "value" semantics in path generation. In general, if a route has a parameter :foo, I'd expected to be able to assign and retrieve any possible string in :foo. The writing side of this seems to be missing.

I'd write a patch to address that, but I'd like first to be sure I am not missing some rationale for the current behaviour.

-- fxn
