mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Remove , and ; (comma and semicolon) from routing separators again. References #8558.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7599 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -248,7 +248,7 @@ module ActionController
|
||||
# end
|
||||
#
|
||||
module Routing
|
||||
SEPARATORS = %w( / ; . , ? )
|
||||
SEPARATORS = %w( / . ? )
|
||||
|
||||
HTTP_METHODS = [:get, :head, :post, :put, :delete]
|
||||
|
||||
@@ -567,7 +567,7 @@ module ActionController
|
||||
end
|
||||
|
||||
class Segment #:nodoc:
|
||||
RESERVED_PCHAR = ':@&=+$'
|
||||
RESERVED_PCHAR = ':@&=+$,;'
|
||||
UNSAFE_PCHAR = Regexp.new("[^#{URI::REGEXP::PATTERN::UNRESERVED}#{RESERVED_PCHAR}]", false, 'N').freeze
|
||||
|
||||
attr_accessor :is_optional
|
||||
|
||||
@@ -22,7 +22,7 @@ class UriReservedCharactersRoutingTest < Test::Unit::TestCase
|
||||
map.connect ':controller/:action/:variable'
|
||||
end
|
||||
|
||||
safe, unsafe = %w(: @ & = + $), %w(^ / ? # [ ] , ;)
|
||||
safe, unsafe = %w(: @ & = + $ , ;), %w(^ / ? # [ ])
|
||||
hex = unsafe.map { |char| '%' + char.unpack('H2').first.upcase }
|
||||
|
||||
@segment = "#{safe}#{unsafe}".freeze
|
||||
|
||||
Reference in New Issue
Block a user