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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
<?php /** * Class AMP_Rule_Spec * * @package AMP */
/** * Class AMP_Rule_Spec * * Set of constants used throughout the sanitizer. * * @internal */ abstract class AMP_Rule_Spec { /* * AMP rule_spec types */ const ATTR_SPEC_LIST = 'attr_spec_list'; const TAG_SPEC = 'tag_spec'; const CDATA = 'cdata';
/* * AMP attr_spec value check results. * * In 0.7 these changed from strings to integers to speed up comparisons. */ const PASS = 1; const FAIL = 0; const NOT_APPLICABLE = -1;
/* * HTML Element Tag rule names */ const DISALLOWED_ANCESTOR = 'disallowed_ancestor'; const MANDATORY_ANCESTOR = 'mandatory_ancestor'; const MANDATORY_PARENT = 'mandatory_parent'; const DESCENDANT_TAG_LIST = 'descendant_tag_list'; const CHILD_TAGS = 'child_tags';
/* * HTML Element Attribute rule names */ const ALLOW_EMPTY = 'allow_empty'; const ALLOW_RELATIVE = 'allow_relative'; const ALLOWED_PROTOCOL = 'protocol'; const ALTERNATIVE_NAMES = 'alternative_names'; const DISALLOWED_VALUE_REGEX = 'disallowed_value_regex'; const MANDATORY = 'mandatory'; const MANDATORY_ANYOF = 'mandatory_anyof'; const MANDATORY_ONEOF = 'mandatory_oneof'; const VALUE = 'value'; const VALUE_CASEI = 'value_casei'; const VALUE_REGEX = 'value_regex'; const VALUE_REGEX_CASEI = 'value_regex_casei'; const VALUE_PROPERTIES = 'value_properties'; const VALUE_URL = 'value_url';
/* * AMP layout types. * * @deprecated Use `AmpProject\Layout` interface instead. */ const LAYOUT_NODISPLAY = 'nodisplay'; const LAYOUT_FIXED = 'fixed'; const LAYOUT_FIXED_HEIGHT = 'fixed-height'; const LAYOUT_RESPONSIVE = 'responsive'; const LAYOUT_CONTAINER = 'container'; const LAYOUT_FILL = 'fill'; const LAYOUT_FLEX_ITEM = 'flex-item'; const LAYOUT_FLUID = 'fluid'; const LAYOUT_INTRINSIC = 'intrinsic';
/** * Attribute name for AMP dev mode. * * @since 1.2.2 * @link https://github.com/ampproject/amphtml/issues/20974 * @var string */ const DEV_MODE_ATTRIBUTE = 'data-ampdevmode';
/** * Supported layout values. * * @deprecated Use `AmpProject\Layout::FROM_SPEC` instead. * * @since 1.0 * @var array */ public static $layout_enum = [ 1 => 'nodisplay', 2 => 'fixed', 3 => 'fixed-height', 4 => 'responsive', 5 => 'container', 6 => 'fill', 7 => 'flex-item', 8 => 'fluid', 9 => 'intrinsic', ];
/** * List of boolean attributes. * * @since 0.7 * @var array */ public static $boolean_attributes = [ 'allowfullscreen', 'async', 'autofocus', 'autoplay', 'checked', 'compact', 'controls', 'declare', 'default', 'defaultchecked', 'defaultmuted', 'defaultselected', 'defer', 'disabled', 'draggable', 'enabled', 'formnovalidate', 'hidden', 'indeterminate', 'inert', 'ismap', 'itemscope', 'loop', 'multiple', 'muted', 'nohref', 'noresize', 'noshade', 'novalidate', 'nowrap', 'open', 'pauseonexit', 'readonly', 'required', 'reversed', 'scoped', 'seamless', 'selected', 'sortable', 'spellcheck', 'translate', 'truespeed', 'typemustmatch', 'visible', ];
/** * Additional allowed tags. * * @var array */ public static $additional_allowed_tags = [
// An experimental tag with no protoascii. 'amp-share-tracking' => [ 'attr_spec_list' => [], 'tag_spec' => [], ], ]; }
|