diff options
Diffstat (limited to 'lib/uri')
-rw-r--r-- | lib/uri/common.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/uri/common.rb b/lib/uri/common.rb index 9f849c03a4..8958c79047 100644 --- a/lib/uri/common.rb +++ b/lib/uri/common.rb @@ -397,8 +397,8 @@ module URI ret = {} # for URI::split - ret[:ABS_URI] = Regexp.new('^' + pattern[:X_ABS_URI] + '$', Regexp::EXTENDED) - ret[:REL_URI] = Regexp.new('^' + pattern[:X_REL_URI] + '$', Regexp::EXTENDED) + ret[:ABS_URI] = Regexp.new('\A\s*' + pattern[:X_ABS_URI] + '\s*\z', Regexp::EXTENDED) + ret[:REL_URI] = Regexp.new('\A\s*' + pattern[:X_REL_URI] + '\s*\z', Regexp::EXTENDED) # for URI::extract ret[:URI_REF] = Regexp.new(pattern[:URI_REF]) |