mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Expose Routing::Segment::SAFE_PCHAR list of path characters that don't need escaping
This commit is contained in:
parent
61842d97c5
commit
ddd552504b
1 changed files with 2 additions and 1 deletions
|
@ -2,7 +2,8 @@ module ActionController
|
|||
module Routing
|
||||
class Segment #:nodoc:
|
||||
RESERVED_PCHAR = ':@&=+$,;'
|
||||
UNSAFE_PCHAR = Regexp.new("[^#{URI::REGEXP::PATTERN::UNRESERVED}#{RESERVED_PCHAR}]", false, 'N').freeze
|
||||
SAFE_PCHAR = "#{URI::REGEXP::PATTERN::UNRESERVED}#{RESERVED_PCHAR}"
|
||||
UNSAFE_PCHAR = Regexp.new("[^#{SAFE_PCHAR}]", false, 'N').freeze
|
||||
|
||||
# TODO: Convert :is_optional accessor to read only
|
||||
attr_accessor :is_optional
|
||||
|
|
Loading…
Reference in a new issue