-
Notifications
You must be signed in to change notification settings - Fork 4
/
250.txt
132 lines (93 loc) · 5.51 KB
/
250.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
[1] [DFN[[RUBYB[妥当な電子メール・アドレス]@en[valid e‐mail address]]]]および[DFN[[RUBYB[妥当な電子メール・アドレス・リスト]@en[valid e‐mail address list]]]]は、
[[HTML]] における[[電子メール]]の[[アドレス]]の表現方法として [[Web Applications 1.0]]
([[HTML5]]) で規定されている[[構文]]です。
* 仕様書
-[2] [[Web Applications 1.0]] ([[HTML5]])
-- [[妥当な電子メール・アドレス]]
<http://www.whatwg.org/specs/web-apps/current-work/complete.html#valid-e-mail-address>
-- [[妥当な電子メール・アドレス・リスト]]
<http://www.whatwg.org/specs/web-apps/current-work/complete.html#valid-e-mail-address-list>
* 構文
** 妥当な電子メール・アドレス
[3] [[妥当な電子メール・アドレス]]は、 [[ABNF]] ([[STD 68]]) [[生成規則]]
- [CODE(ABNF)@en[1*( [[atext]] / "." ) "@" [[ldh-str]] *( "." [[ldh-str]] )]]
-- [CODE(ABNF)@en[[[atext]]]] は [[RFC 5322]] 3.2.3 節で定義されているもの
-- [CODE(ABNF)@en[[[ldh-str]]]] は [[RFC 1034]] 3.5 節で定義されているもの
と[[一致]]する[[文字列]]です [SRC[[[Web Applications 1.0]]]]。
[FIG(railroad)[
= +
== |
=== [CODE(ABNF)@en[[[atext]]]]
=== [CODE(char)[[[.]]]]
= [CODE[@]]
= [CODE(ABNF)@en[[[ldh-str]]]]
= *
== [CODE[[[.]]]]
== [CODE(ABNF)@en[[[ldh-str]]]]
]FIG]
[6] [[Web Applications 1.0]] は [[Note]] ([[参考]]) で次のように述べています。
- この[[要件]]は [[RFC 5322]] の[[意図的違反]]である
- [[RFC 5322]] の[[電子メイル・アドレス]]の構文は、[[HTML]] での利用には実用的でない
-- [[local-part]] が厳しすぎる
-- [[domain]] が曖昧すぎる
-- 緩すぎる ([[注釈]]、[[空白文字]]、[[引用文字列]]を変なところで認めている)
** 妥当な電子メール・アドレス・リスト
[4] [[妥当な電子メール・アドレス・リスト]]は、[[妥当な電子メール・アドレス]]を[[字句]]とする、
[[読点分離字句の集合]]です [SRC[[[Web Applications 1.0]]]]。
* 処理モデル
** 妥当な電子メール・アドレス・リスト
[5] [[利用者エージェント]]は[[妥当な電子メール・アドレス・リスト]]から[[字句]]の[[リスト]]を得るに当たり、
[[読点で文字列を分離]]しなければ[['''なりません''']] [SRC[[[Web Applications 1.0]]]]。
* 歴史
[8] [[Web Forms 2.0]] ではじめて [CODE(HTML)@en[[[<input type=email>]]]]
が規定されましたが、当時は [[RFC 2822]] (後の [[RFC 5322]])
のものから[[注釈]]などを認めないというような記述で、
構文には特に名前は与えられていませんでした。
[9] [[Web Forms 2.0]] の [[HTML5]] への統合に伴い仕様書が書き直された際に、
「[[妥当なメール・アドレス]]」と呼ばれるようになりました。
[10] 更に [CODE(HTMLa)@en[[[multiple]]]] [[属性]]が追加され、
「[[妥当なメール・アドレス・リスト]]」なる構文も定義されました。
@@ >>9-10 の辺りの時系列は要確認です。
[11] その後定義が実用上の観点から見直され、 [[RFC 5322]]
に対する[[意図的違反]]が行われるに至りました。
- <http://html5.org/tools/web-apps-tracker?from=3715&to=3716>
- <http://html5.org/tools/web-apps-tracker?from=3716&to=3717>
[12] [CITE@en[Web Applications 1.0 r5796 allow @localhost addresses for testing.]]
( ([TIME[2011-01-21 10:47:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=5795&to=5796>
* 関連
[7] [[妥当な電子メール・アドレス]]や[[妥当な電子メール・アドレス・リスト]]は
[CODE(HTML)@en[[[<input type=email>]]]] の[[値]]で用いられています。
[23] [CITE@en['''['''whatwg''']''' Comments on the definition of a valid e-mail address]]
([[Ian Hickson]]著, [TIME[2009-08-31 14:53:47 +09:00]])
<https://lists.w3.org/Archives/Public/public-whatwg-archive/2009Aug/0807.html>
[FIG(quote)[
[FIGCAPTION[
[13] [CITE[About notification emails - User Documentation]]
( ([TIME[2016-12-13 11:33:07 +09:00]]))
<https://help.github.com/articles/about-notification-emails/>
]FIGCAPTION]
> In addition, there's a second Cc email address that matches the notification reason. The suffix for all of these notification reasons is @noreply.github.com. The possible notification reasons are:
]FIG]
[FIG(quote)[
[FIGCAPTION[
[14] [CITE@ja[「アイドルマスター ミリオンライブ! シアターデイズ」 事前登録キャンペーン |バンダイナムコエンターテインメント]]
([TIME[2017-04-30 12:50:48 +09:00]])
<https://prereg.bn-ent.net/common/serial.php?action=input&device_type=2&app=imasml_theater>
]FIGCAPTION]
> __(アンダースコア連続) と --(ハイフン連続)と..(ドット連続)を含むメールアドレスではご利用いただけません。
]FIG]
[15] [CITE@en[RFC 5070 - The Incident Object Description Exchange Format]]
([TIME[2017-05-07 20:04:30 +09:00]])
<https://tools.ietf.org/html/rfc5070#section-2.14>
[16] [CITE@en[RFC 7970 - The Incident Object Description Exchange Format Version 2]]
([TIME[2017-05-14 16:49:04 +09:00]])
<https://tools.ietf.org/html/rfc7970#section-2.12>
[FIG(quote)[
[FIGCAPTION[
[17] [CITE[GitHub Flavored Markdown Spec]]
([TIME[2017-05-15 12:05:46 +09:00]])
<https://github.github.com/gfm/>
]FIGCAPTION]
> An email address, for these purposes, is anything that matches the non-normative regex from the HTML5 spec
]FIG]