PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.1.0
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.1.0
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
acymailing / back / Helpers / SecurityHelper.php

SecurityHelper.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress 11.1.0, at back/Helpers/SecurityHelper.php

204 lines 4.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace AcyMailing\Helpers;
4
5 use AcyMailing\Core\AcymObject;
6
7 class SecurityHelper extends AcymObject
8 {
9 const ALLOWED_HTML_DATE = [
10 'div' => [
11 'class' => true,
12 'style' => true,
13 'id' => true,
14 'data-reveal' => true,
15 'data-reveal-larger' => true,
16 ],
17 'input' => [
18 'type' => true,
19 'name' => true,
20 'id' => true,
21 'value' => true,
22 'class' => true,
23 'data-open' => true,
24 'readonly' => true,
25 'data-rs' => true,
26 'onchange' => true,
27 'data-reveal' => true,
28 'data-reveal-larger' => true,
29 ],
30 'span' => ['class' => true, 'aria-hidden' => true],
31 'button' => [
32 'type' => true,
33 'class' => true,
34 'data-close' => true,
35 'data-type' => true,
36 'aria-label' => true,
37 'data-open' => true,
38 ],
39 'select' => [
40 'id' => true,
41 'name' => true,
42 'class' => true,
43 ],
44 'optgroup' => ['label' => true],
45 'option' => ['value' => true, 'selected' => true, 'disabled' => true],
46 ];
47
48 const ALLOWED_HTML_SELECT = [
49 'select' => [
50 'class' => true,
51 'name' => true,
52 'id' => true,
53 ],
54 'option' => [
55 'value' => true,
56 'selected' => true,
57 'disabled' => true,
58 ],
59 ];
60
61 const ALLOWED_HTML_TERMS = [
62 'a' => [
63 'href' => true,
64 'target' => true,
65 'title' => true,
66 'class' => true,
67 'rel' => true,
68 'aria-label' => true,
69 'data-acym-modal' => true,
70 ],
71 'div' => [
72 'class' => true,
73 'id' => true,
74 'style' => true,
75 ],
76 'span' => [
77 ],
78 'iframe' => [
79 'class' => true,
80 'src' => true,
81 ],
82 ];
83
84 const ALLOWED_HTML_FIELD_NAME = [
85 'b' => [],
86 'br' => [],
87 'strong' => [],
88 'em' => [],
89 'i' => [],
90 'span' => [
91 'class' => true,
92 ],
93 ];
94
95 const ALLOWED_HTML_INTRO = [
96 'i' => [
97 'class' => true,
98 ],
99 'b' => [
100 'class' => true,
101 ],
102 'p' => [
103 'class' => true,
104 ],
105 'strong' => [
106 'class' => true,
107 ],
108 'span' => [
109 'class' => true,
110 ],
111 ];
112
113 const ALLOWED_HTML_NOTIFICATION = [
114 'a' => [
115 'href' => true,
116 'target' => true,
117 'id' => true,
118 'class' => true,
119 'title' => true,
120 ],
121 'b' => [],
122 'br' => [],
123 'i' => [],
124 'p' => [
125 'class' => true,
126 'title' => true,
127 ],
128 'pre' => [],
129 'strong' => [],
130 ];
131
132 const ALLOWED_HTML_MESSAGE = [
133 'a' => [
134 'href' => true,
135 'target' => true,
136 'id' => true,
137 'class' => true,
138 'title' => true,
139 ],
140 'b' => [],
141 'br' => [],
142 'div' => [
143 'class' => true,
144 ],
145 'i' => [],
146 'li' => [],
147 'p' => [
148 'class' => true,
149 'title' => true,
150 ],
151 'pre' => [],
152 'span' => [
153 'class' => true,
154 'data-acym-email-id' => true,
155 ],
156 'strong' => [],
157 'ul' => [],
158 ];
159
160 const ALLOWED_HTML_CHECKBOX_LABEL = [
161 'div' => [
162 'class' => true,
163 ],
164 'span' => [
165 'class' => true,
166 ],
167 'input' => [
168 'class' => true,
169 'type' => true,
170 'name' => true,
171 'value' => true,
172 ],
173 'select' => [
174 'class' => true,
175 'name' => true,
176 'id' => true,
177 ],
178 'option' => [
179 'value' => true,
180 'selected' => true,
181 'disabled' => true,
182 ],
183 ];
184
185 const ALLOWED_HTML_PARAM_FIELD = [
186 'input' => [
187 'type' => true,
188 'name' => true,
189 'value' => true,
190 ],
191 'select' => [
192 'class' => true,
193 'id' => true,
194 'name' => true,
195 'multiple' => true,
196 ],
197 'option' => [
198 'value' => true,
199 'selected' => true,
200 'disabled' => true,
201 ],
202 ];
203 }
204