ruby-changes:36435
From: usa <ko1@a...>
Date: Fri, 21 Nov 2014 00:19:23 +0900 (JST)
Subject: [ruby-changes:36435] usa:r48516 (trunk): * lib/uri/mailto.rb (URI::MailTo::EMAIL_REGEXP): should escape `#`.
usa 2014-11-21 00:19:17 +0900 (Fri, 21 Nov 2014) New Revision: 48516 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48516 Log: * lib/uri/mailto.rb (URI::MailTo::EMAIL_REGEXP): should escape `#`. Modified files: trunk/lib/uri/mailto.rb Index: lib/uri/mailto.rb =================================================================== --- lib/uri/mailto.rb (revision 48515) +++ lib/uri/mailto.rb (revision 48516) @@ -52,7 +52,7 @@ module URI https://github.com/ruby/ruby/blob/trunk/lib/uri/mailto.rb#L52 HEADER_REGEXP = /\A(?<hfield>(?:%\h\h|[!$'-.0-;@-Z_a-z~])*=(?:%\h\h|[!$'-.0-;@-Z_a-z~])*)(?:&\g<hfield>)*\z/ # practical regexp for email address # http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address - EMAIL_REGEXP = /\A[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\z/ + EMAIL_REGEXP = /\A[a-zA-Z0-9.!\#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\z/ # :startdoc: # -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/