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
← All changes | back/Views/Configuration/tmpl/mail.php +168 -129 10.1.4 → 11.1.0 View file →
@@ -1,12 +1,16 @@
1 -<input type="hidden" id="acym__config__mail__embed__image__blocked" value="<?php echo acym_escape($data['embedImage']); ?>">
2 -<input type="hidden" id="acym__config__mail__embed__attachment__blocked" value="<?php echo acym_escape($data['embedAttachment']); ?>">
1 +<?php
2 +// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- View file, its variables are local to the include scope, not true globals.
3 +defined('ABSPATH') || die('Restricted Access');
4 +?>
5 +<input type="hidden" id="acym__config__mail__embed__image__blocked" value="<?php echo esc_attr(json_encode($data['embedImage'])); ?>">
6 +<input type="hidden" id="acym__config__mail__embed__attachment__blocked" value="<?php echo esc_attr(json_encode($data['embedAttachment'])); ?>">
3 7 <div class="acym__content acym_area padding-vertical-1 padding-horizontal-2">
4 8 <div class="cell acym__config__mail-default">
5 - <div class="acym__title acym__title__secondary"><?php echo acym_translation('ACYM_DEFAULT_SENDER'); ?></div>
9 + <div class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_DEFAULT_SENDER')); ?></div>
6 10 <?php
7 11 if (!empty($data['translation_languages'])) {
8 - echo acym_displayLanguageRadio(
12 + acym_displayLanguageRadio(
9 13 $data['translation_languages'],
10 14 'config[sender_info_translation]',
11 15 $this->config->get('sender_info_translation', ''),
12 16 acym_translation('ACYM_LANGUAGE_SENDER_INFORMATION_DESC'),
@@ -16,70 +20,84 @@
16 20 } ?>
17 21 <div class="grid-x grid-margin-x margin-y">
18 22 <div class="cell large-6 xlarge-4">
19 23 <label class="cell grid-x">
20 - <span class="cell"><?php echo acym_translation('ACYM_FROM_NAME').acym_info('ACYM_FROM_DESC'); ?></span>
24 + <span class="cell"><?php echo esc_html(acym_translation('ACYM_FROM_NAME'));
25 + acym_info(['textShownInTooltip' => 'ACYM_FROM_DESC']); ?></span>
21 26 <input type="text"
22 - name="config[from_name]"
23 - placeholder="<?php echo acym_translation('ACYM_FROM_NAME_PLACEHOLDER'); ?>"
24 - value="<?php echo acym_escape($this->config->get('from_name')); ?>" />
27 + name="config[from_name]"
28 + placeholder="<?php echo esc_attr(acym_translation('ACYM_FROM_NAME_PLACEHOLDER')); ?>"
29 + value="<?php echo esc_attr($this->config->get('from_name')); ?>" />
25 30 </label>
26 31 </div>
27 32 <div class="cell large-6 xlarge-4">
28 33 <label class="cell grid-x">
29 - <span class="cell"><?php echo acym_translation('ACYM_FROM_EMAIL').acym_info('ACYM_FROM_DESC'); ?></span>
34 + <span class="cell"><?php echo esc_html(acym_translation('ACYM_FROM_EMAIL'));
35 + acym_info(['textShownInTooltip' => 'ACYM_FROM_DESC']); ?></span>
30 36 <input type="email"
31 - name="config[from_email]"
32 - placeholder="<?php echo acym_translation('ACYM_FROM_EMAIL_PLACEHOLDER'); ?>"
33 - value="<?php echo acym_escape($this->config->get('from_email')); ?>" />
37 + name="config[from_email]"
38 + placeholder="<?php echo esc_attr(acym_translation('ACYM_FROM_EMAIL_PLACEHOLDER')); ?>"
39 + value="<?php echo esc_attr($this->config->get('from_email')); ?>" />
34 40 </label>
35 41 </div>
36 - <?php if (!empty($data['button_copy_settings_from'])) echo $data['button_copy_settings_from']; ?>
42 + <?php
43 + if (!empty($data['wp_mail_smtp_installed'])) {
44 + $pluginClass = new AcymPlugin();
45 + $pluginClass->getCopySettingsButton($data, 'from_options', 'wp_mail_smtp');
46 + }
47 + ?>
37 48 <div class="cell margin-bottom-1 acym_vcenter">
38 - <input type="hidden" id="from_as_replyto_value" name="config[from_as_replyto]" value="<?php echo acym_escape($this->config->get('from_as_replyto', 1)); ?>" />
49 + <input type="hidden" id="from_as_replyto_value" name="config[from_as_replyto]" value="<?php echo esc_attr($this->config->get('from_as_replyto', 1)); ?>" />
39 50 <input id="from_as_replyto" data-toggle="acy_toggle_replyto" data-value="from_as_replyto_value" class="acym_toggle" type="checkbox" <?php
40 - if ($this->config->get('from_as_replyto', 1) == 1) {
41 - echo 'checked="checked"';
42 - }
51 + checked($this->config->get('from_as_replyto', 1) == 1);
43 52 ?>/>
44 53 <label for="from_as_replyto">
45 - <?php echo acym_translation('ACYM_FROM_AS_REPLYTO'); ?>
54 + <?php echo esc_html(acym_translation('ACYM_FROM_AS_REPLYTO')); ?>
46 55 </label>
47 56 </div>
48 57
49 58 <div class="cell large-6 xlarge-4 acy_toggle_replyto">
50 59 <label class="cell grid-x">
51 - <span class="cell"><?php echo acym_translation('ACYM_REPLYTO_NAME').acym_info('ACYM_REPLYTO_DESC'); ?></span>
60 + <span class="cell"><?php echo esc_html(acym_translation('ACYM_REPLYTO_NAME'));
61 + acym_info(['textShownInTooltip' => 'ACYM_REPLYTO_DESC']); ?></span>
52 62 <input type="text"
53 - name="config[replyto_name]"
54 - placeholder="<?php echo acym_translation('ACYM_REPLYTO_NAME_PLACEHOLDER'); ?>"
55 - value="<?php echo acym_escape($this->config->get('replyto_name')); ?>" />
63 + name="config[replyto_name]"
64 + placeholder="<?php echo esc_attr(acym_translation('ACYM_REPLYTO_NAME_PLACEHOLDER')); ?>"
65 + value="<?php echo esc_attr($this->config->get('replyto_name')); ?>" />
56 66 </label>
57 67 </div>
58 68 <div class="cell large-6 xlarge-4 acy_toggle_replyto">
59 69 <label class="cell grid-x">
60 - <span class="cell"><?php echo acym_translation('ACYM_REPLYTO_EMAIL').acym_info('ACYM_REPLYTO_DESC'); ?></span>
70 + <span class="cell"><?php echo esc_html(acym_translation('ACYM_REPLYTO_EMAIL'));
71 + acym_info(['textShownInTooltip' => 'ACYM_REPLYTO_DESC']); ?></span>
61 72 <input type="email"
62 - name="config[replyto_email]"
63 - placeholder="<?php echo acym_translation('ACYM_REPLYTO_EMAIL_PLACEHOLDER'); ?>"
64 - value="<?php echo acym_escape($this->config->get('replyto_email')); ?>" />
73 + name="config[replyto_email]"
74 + placeholder="<?php echo esc_attr(acym_translation('ACYM_REPLYTO_EMAIL_PLACEHOLDER')); ?>"
75 + value="<?php echo esc_attr($this->config->get('replyto_email')); ?>" />
65 76 </label>
66 77 </div>
67 78
68 79 <div class="cell grid-x">
69 80 <div class="cell medium-6 large-4 xlarge-3 grid-x">
70 - <?php echo acym_switch('config[add_names]', $this->config->get('add_names'), acym_translation('ACYM_ADD_NAMES').acym_info('ACYM_ADD_NAMES_DESC')); ?>
81 + <?php
82 + acym_switch([
83 + 'name' => 'config[add_names]',
84 + 'value' => $this->config->get('add_names'),
85 + 'label' => acym_translation('ACYM_ADD_NAMES'),
86 + 'tip' => ['textShownInTooltip' => 'ACYM_ADD_NAMES_DESC'],
87 + ]); ?>
71 88 </div>
72 89 </div>
73 90
74 91 <div class="cell grid-x">
75 92 <label class="cell large-6 xlarge-4 grid-x">
76 - <span class="cell"><?php echo acym_translation('ACYM_BOUNCE_EMAIL').acym_info('ACYM_BOUNCE_ADDRESS_DESC'); ?></span>
93 + <span class="cell"><?php echo esc_html(acym_translation('ACYM_BOUNCE_EMAIL'));
94 + acym_info(['textShownInTooltip' => 'ACYM_BOUNCE_ADDRESS_DESC']); ?></span>
77 95 <input type="text"
78 - name="config[bounce_email]"
79 - placeholder="<?php echo acym_translation('ACYM_BOUNCE_EMAIL_PLACEHOLDER'); ?>"
80 - value="<?php echo acym_escape($this->config->get('bounce_email')); ?>"
81 - id="bounceAddress1" />
96 + name="config[bounce_email]"
97 + placeholder="<?php echo esc_attr(acym_translation('ACYM_BOUNCE_EMAIL_PLACEHOLDER')); ?>"
98 + value="<?php echo esc_attr($this->config->get('bounce_email')); ?>"
99 + id="bounceAddress1" />
82 100 </label>
83 101 </div>
84 102 </div>
85 103 </div>
@@ -84,55 +102,57 @@
84 102 </div>
85 103 </div>
86 104
87 105 <div class="cell acym__configuration__mail-settings">
88 - <div class="acym__title acym__title__secondary margin-top-3"><?php echo acym_translation('ACYM_CONFIGURATION_MAIL').acym_info('ACYM_INTRO_MAIL_SETTINGS'); ?></div>
106 + <div class="acym__title acym__title__secondary margin-top-3"><?php echo esc_html(acym_translation('ACYM_CONFIGURATION_MAIL'));
107 + acym_info(
108 + ['textShownInTooltip' => 'ACYM_INTRO_MAIL_SETTINGS']
109 + ); ?></div>
89 110 <?php include acym_getPartial('configuration', 'sending_methods'); ?>
90 111 </div>
91 112 </div>
92 113
93 114 <div class="acym__content acym_area padding-vertical-1 padding-horizontal-2">
94 - <div class="acym__title acym__title__secondary"><?php echo acym_translation('ACYM_EMAIL_EDITOR'); ?></div>
115 + <div class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_EMAIL_EDITOR')); ?></div>
95 116 <div class="grid-x margin-y">
96 117 <div class="cell grid-x grid-margin-x">
97 118 <?php
98 - echo acym_switch(
99 - 'config[save_thumbnail]',
100 - $this->config->get('save_thumbnail', 1),
101 - acym_translation('ACYM_SAVE_TEMPLATE_THUMBNAIL').acym_info('ACYM_SAVE_TEMPLATE_THUMBNAIL_DESC'),
102 - [],
103 - 'xlarge-3 medium-5 small-9'
104 - );
119 + acym_switch([
120 + 'name' => 'config[save_thumbnail]',
121 + 'value' => $this->config->get('save_thumbnail', 1),
122 + 'label' => acym_translation('ACYM_SAVE_TEMPLATE_THUMBNAIL'),
123 + 'tip' => ['textShownInTooltip' => 'ACYM_SAVE_TEMPLATE_THUMBNAIL_DESC'],
124 + 'labelClass' => 'xlarge-3 medium-5 small-9',
125 + ]);
105 126 ?>
106 127 </div>
107 128 <?php if ($this->config->get('built_by_update', 0) == 1 || acym_level(ACYM_ESSENTIAL)) { ?>
108 129 <div class="cell grid-x grid-margin-x">
109 130 <?php
110 - echo acym_switch(
111 - 'config[display_built_by]',
112 - $this->config->get('display_built_by', 0),
113 - acym_translation('ACYM_ADD_BUILT_BY_FOOTER'),
114 - [],
115 - 'xlarge-3 medium-5 small-9'
116 - );
131 + acym_switch([
132 + 'name' => 'config[display_built_by]',
133 + 'value' => $this->config->get('display_built_by', 0),
134 + 'label' => html_entity_decode(acym_translation('ACYM_ADD_BUILT_BY_FOOTER_UNSUB_PAGE')),
135 + 'labelClass' => 'xlarge-3 medium-5 small-9',
136 + ]);
117 137 ?>
118 138 </div>
119 139 <?php } ?>
120 140 <div class="cell grid-x grid-margin-x">
121 141 <?php
122 - echo acym_switch(
123 - 'config[add_play_button_video]',
124 - $this->config->get('add_play_button_video', 1),
125 - acym_translation('ACYM_ADD_PLAY_BUTTON'),
126 - [],
127 - 'xlarge-3 medium-5 small-9'
128 - );
142 + acym_switch([
143 + 'name' => 'config[add_play_button_video]',
144 + 'value' => $this->config->get('add_play_button_video', 1),
145 + 'label' => acym_translation('ACYM_ADD_PLAY_BUTTON'),
146 + 'labelClass' => 'xlarge-3 medium-5 small-9',
147 + ]);
129 148 ?>
130 149 </div>
131 150 <div class="cell grid-x">
132 151 <label class="cell medium-6 grid-x">
133 152 <span class="cell medium-6">
134 - <?php echo acym_translation('ACYM_UNSPLASH_ACCESS_KEY').acym_info('ACYM_UNSPLASH_ACCESS_KEY_DESC'); ?>
153 + <?php echo esc_html(acym_translation('ACYM_UNSPLASH_ACCESS_KEY'));
154 + acym_info(['textShownInTooltip' => 'ACYM_UNSPLASH_ACCESS_KEY_DESC']); ?>
135 155 </span>
136 156 <?php
137 157 $unsplashKey = $this->config->get('unsplash_key');
138 158 if (strlen($unsplashKey) > 5) {
@@ -139,28 +159,29 @@
139 159 $unsplashKey = str_repeat('*', 10).substr($unsplashKey, -5);
140 160 }
141 161 ?>
142 162 <input type="text"
143 - name="config[unsplash_key]"
144 - value="<?php echo acym_escape($unsplashKey); ?>"
145 - class="cell medium-auto" />
163 + name="config[unsplash_key]"
164 + value="<?php echo esc_attr($unsplashKey); ?>"
165 + class="cell medium-auto" />
146 166 </label>
147 167 </div>
148 168 <div class="cell grid-x">
149 169 <label class="cell medium-6 grid-x">
150 170 <span class="cell medium-6">
151 - <?php echo acym_translation('ACYM_TENOR_ACCESS_KEY').acym_info('ACYM_TENOR_ACCESS_KEY_DESC'); ?>
171 + <?php echo esc_html(acym_translation('ACYM_GIPHY_API_KEY'));
172 + acym_info(['textShownInTooltip' => 'ACYM_GIPHY_API_KEY_DESC']); ?>
152 173 </span>
153 174 <?php
154 - $tenorKey = $this->config->get('tenor_key');
155 - if (strlen($tenorKey) > 5) {
156 - $tenorKey = str_repeat('*', 10).substr($tenorKey, -5);
175 + $giphyKey = $this->config->get('giphy_key');
176 + if (strlen($giphyKey) > 5) {
177 + $giphyKey = str_repeat('*', 10).substr($giphyKey, -5);
157 178 }
158 179 ?>
159 180 <input type="text"
160 - name="config[tenor_key]"
161 - value="<?php echo acym_escape($tenorKey); ?>"
162 - class="cell medium-auto" />
181 + name="config[giphy_key]"
182 + value="<?php echo esc_attr($giphyKey); ?>"
183 + class="cell medium-auto" />
163 184 </label>
164 185 </div>
165 186 </div>
166 187 </div>
@@ -167,12 +188,12 @@
167 188
168 189 <div class="acym__content acym_area grid-x grid-margin-y padding-horizontal-2 acym__configuration__advanced">
169 190 <div class="cell grid-x acym__configuration__showmore-head">
170 191 <div class="acym__title acym__title__secondary cell auto margin-bottom-0">
171 - <?php echo acym_translation('ACYM_CONFIGURATION_ADVANCED'); ?>
192 + <?php echo esc_html(acym_translation('ACYM_CONFIGURATION_ADVANCED')); ?>
172 193 </div>
173 194 <div class="cell shrink">
174 - <?php echo acym_showMore('acym__configuration__mail__advanced__content'); ?>
195 + <?php acym_showMore('acym__configuration__mail__advanced__content'); ?>
175 196 </div>
176 197 </div>
177 198 <div id="acym__configuration__mail__advanced__content" style="display:none;">
178 199 <div class="grid-x grid-margin-x margin-y">
@@ -177,9 +198,9 @@
177 198 <div id="acym__configuration__mail__advanced__content" style="display:none;">
178 199 <div class="grid-x grid-margin-x margin-y">
179 200 <div class="cell medium-6 grid-x">
180 201 <div class="cell large-6">
181 - <label for="config_encoding"><?php echo acym_translation('ACYM_CONFIGURATION_ENCODING'); ?></label>
202 + <label for="config_encoding"><?php echo esc_html(acym_translation('ACYM_CONFIGURATION_ENCODING')); ?></label>
182 203 </div>
183 204 <div class="cell large-6">
184 205 <?php
185 206 $encodingHelper = $data['encodingHelper'];
@@ -189,16 +210,17 @@
189 210 </div>
190 211
191 212 <div class="cell medium-6 grid-x">
192 213 <div class="cell large-6">
193 - <label for="config_charset"><?php echo acym_translation('ACYM_CONFIGURATION_CHARSET'); ?></label>
214 + <label for="config_charset"><?php echo esc_html(acym_translation('ACYM_CONFIGURATION_CHARSET')); ?></label>
194 215 </div>
195 216 <div class="cell large-6">
196 217 <?php
197 - echo $encodingHelper->charsetField(
218 + $encodingHelper->charsetField(
198 219 'config[charset]',
199 220 $this->config->get('charset'),
200 - ['class' => 'acym__select']
221 + ['class' => 'acym__select'],
222 + true
201 223 );
202 224 ?>
203 225 </div>
204 226 </div>
@@ -237,37 +259,36 @@
237 259 $info = empty($option['info_disabled']) ? '' : '<span class="acym__configuration__mail__info__disabled">'.acym_translation($option['info_disabled']).'</span> ';
238 260
239 261 $description = $label.'_DESC';
240 262 $translatedDescription = acym_translation($description);
241 - $label = acym_translation($label);
242 263 if ($translatedDescription !== $description) {
243 264 $info .= $translatedDescription;
244 265 }
245 266
246 - if (!empty($info)) {
247 - $info = acym_info($info);
248 - }
249 -
250 267 $default = empty($option['default']) ? 0 : $option['default'];
251 268
252 - echo acym_switch(
253 - 'config['.$oneOption.']',
254 - $this->config->get($oneOption, $default),
255 - $label.$info
256 - );
269 + acym_switch([
270 + 'name' => 'config['.$oneOption.']',
271 + 'value' => $this->config->get($oneOption, $default),
272 + 'label' => acym_translation($label),
273 + 'tip' => empty($info) ? null : ['textShownInTooltip' => $info],
274 + ]);
257 275
258 276 echo '</div>';
259 277 }
260 -
261 - $style = $this->config->get('embed_files', 0) ? 'style="display:none;"' : '';
262 278 ?>
263 - <div class="cell medium-6 grid-x" id="attachments_position" <?php echo $style; ?>>
279 + <div class="cell medium-6 grid-x" id="attachments_position" <?php echo $this->config->get('embed_files', 0) ? 'style="display:none;"' : ''; ?>>
264 280 <div class="cell large-6">
265 - <?php echo acym_translation('ACYM_CONFIGURATION_ATTACHMENTS_POSITION').acym_info('ACYM_CONFIGURATION_ATTACHMENTS_POSITION_DESC'); ?>
281 + <?php
282 + echo esc_html(acym_translation('ACYM_CONFIGURATION_ATTACHMENTS_POSITION'));
283 + acym_info(
284 + ['textShownInTooltip' => 'ACYM_CONFIGURATION_ATTACHMENTS_POSITION_DESC']
285 + );
286 + ?>
266 287 </div>
267 288 <div class="cell large-6">
268 289 <?php
269 - echo acym_select(
290 + acym_select(
270 291 [
271 292 'top' => acym_translation('ACYM_TOP_OF_EMAIL_CONTENT'),
272 293 'bottom' => acym_translation('ACYM_BOTTOM_OF_EMAIL_CONTENT'),
273 294 ],
@@ -272,9 +293,14 @@
272 293 'bottom' => acym_translation('ACYM_BOTTOM_OF_EMAIL_CONTENT'),
273 294 ],
274 295 'config[attachments_position]',
275 296 $this->config->get('attachments_position', 'bottom'),
276 - ['class' => 'acym__select']
297 + ['class' => 'acym__select'],
298 + 'value',
299 + 'text',
300 + null,
301 + false,
302 + true
277 303 );
278 304 ?>
279 305 </div>
280 306 </div>
@@ -280,39 +306,39 @@
280 306 </div>
281 307 <div class="cell medium-6 grid-x">
282 308 <label class="cell grid-x">
283 309 <span class="cell medium-6">
284 - <?php echo acym_translation('ACYM_MAIL_MAX_LINE_LENGTH').acym_info('ACYM_MAIL_MAX_LINE_LENGTH_DESC'); ?>
310 + <?php echo esc_html(acym_translation('ACYM_MAIL_MAX_LINE_LENGTH'));
311 + acym_info(['textShownInTooltip' => 'ACYM_MAIL_MAX_LINE_LENGTH_DESC']); ?>
285 312 </span>
286 313 <input type="number"
287 - name="config[mailer_wordwrap]"
288 - value="<?php echo acym_escape($this->config->get('mailer_wordwrap', 0)); ?>"
289 - min="0"
290 - max="998"
291 - class="cell medium-auto" />
314 + name="config[mailer_wordwrap]"
315 + value="<?php echo esc_attr($this->config->get('mailer_wordwrap', 0)); ?>"
316 + min="0"
317 + max="998"
318 + class="cell medium-auto" />
292 319 </label>
293 320 </div>
294 321 <div class="cell medium-6 grid-x">
295 - <?php echo acym_switch(
296 - 'config[dkim]',
297 - $this->config->get('dkim'),
298 - acym_translation('ACYM_CONFIGURATION_DKIM').acym_info('ACYM_INTRO_DKIM'),
299 - [],
300 - 'medium-6 small-9',
301 - 'auto',
302 - '',
303 - 'dkim_config'
304 - ); ?>
322 + <?php
323 + acym_switch([
324 + 'name' => 'config[dkim]',
325 + 'value' => $this->config->get('dkim'),
326 + 'label' => acym_translation('ACYM_CONFIGURATION_DKIM'),
327 + 'tip' => ['textShownInTooltip' => 'ACYM_INTRO_DKIM'],
328 + 'toggle' => 'dkim_config',
329 + ]); ?>
305 330 </div>
306 331 </div>
307 332
308 333
309 334 <div class="cell acym__configuration__dkim padding-vertical-1 margin-y" id="dkim_config">
310 - <div class="acym__title acym__title__secondary"><?php echo acym_translation('ACYM_DKIM_SETTINGS'); ?></div>
335 + <div class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_DKIM_SETTINGS')); ?></div>
311 336 <?php
312 337 $domain = $this->config->get('dkim_domain', '');
313 338 if (empty($domain)) {
314 339 $domain = preg_replace(['#^https?://(www\.)*#i', '#^www\.#'], '', ACYM_LIVE);
340 + //we load the first part of the domain, until we get a / (yes, there is always a / at the end as the ACYM_LIVE adds one)
315 341 $domain = substr($domain, 0, strpos($domain, '/'));
316 342 }
317 343
318 344 $dkimSelector = $this->config->get('dkim_selector', 'acy');
@@ -320,75 +346,87 @@
320 346 ?>
321 347 <div class="grid-x grid-margin-x">
322 348 <div class="cell large-6 grid-x grid-margin-x margin-y">
323 349 <label for="dkim_domain_name" class="cell large-2 medium-3">
324 - <?php echo acym_translation('ACYM_DKIM_DOMAIN'); ?>
350 + <?php echo esc_html(acym_translation('ACYM_DKIM_DOMAIN')); ?>
325 351 </label>
326 352 <div class="cell large-10 medium-9">
327 - <input id="dkim_domain_name" type="text" name="config[dkim_domain]" value="<?php echo acym_escape($domain); ?>">
353 + <input id="dkim_domain_name" type="text" name="config[dkim_domain]" value="<?php echo esc_attr($domain); ?>">
328 354 </div>
329 355
330 356 <label for="dkim_selector" class="cell large-2 medium-3">
331 - <?php echo acym_translation('ACYM_DKIM_SELECTOR'); ?>
357 + <?php echo esc_html(acym_translation('ACYM_DKIM_SELECTOR')); ?>
332 358 </label>
333 359 <div class="cell large-10 medium-9">
334 - <input id="dkim_selector" type="text" name="config[dkim_selector]" value="<?php echo acym_escape($this->config->get('dkim_selector', 'acy')); ?>">
360 + <input id="dkim_selector" type="text" name="config[dkim_selector]" value="<?php echo esc_attr($this->config->get('dkim_selector', 'acy')); ?>">
335 361 </div>
336 362
337 363 <label for="dkim_private" class="cell large-2 medium-3">
338 - <?php echo acym_translation('ACYM_DKIM_PRIVATE'); ?>
364 + <?php echo esc_html(acym_translation('ACYM_DKIM_PRIVATE')); ?>
339 365 </label>
340 366 <div class="cell large-10 medium-9">
341 - <textarea id="dkim_private" name="config[dkim_private]"><?php echo $this->config->get('dkim_private', ''); ?></textarea>
367 + <textarea id="dkim_private" name="config[dkim_private]"><?php echo esc_html($this->config->get('dkim_private', '')); ?></textarea>
342 368 </div>
343 369 </div>
344 370
345 371 <div class="cell large-6 grid-x grid-margin-x margin-y">
346 372 <label for="dkim_passphrase" class="cell large-2 medium-3">
347 - <?php echo acym_translation('ACYM_DKIM_PASSPHRASE'); ?>
373 + <?php echo esc_html(acym_translation('ACYM_DKIM_PASSPHRASE')); ?>
348 374 </label>
349 375 <div class="cell large-10 medium-9">
350 376 <input id="dkim_passphrase"
351 - type="text"
352 - name="config[dkim_passphrase]"
353 - value="<?php echo acym_escape($this->config->get('dkim_passphrase', '')); ?>">
377 + type="text"
378 + name="config[dkim_passphrase]"
379 + value="<?php echo esc_attr($this->config->get('dkim_passphrase', '')); ?>">
354 380 </div>
355 381
356 382 <label for="dkim_identity" class="cell large-2 medium-3">
357 - <?php echo acym_translation('ACYM_DKIM_IDENTITY'); ?>
383 + <?php echo esc_html(acym_translation('ACYM_DKIM_IDENTITY')); ?>
358 384 </label>
359 385 <div class="cell large-10 medium-9">
360 - <input id="dkim_identity" type="text" name="config[dkim_identity]" value="<?php echo acym_escape($this->config->get('dkim_identity', '')); ?>">
386 + <input id="dkim_identity" type="text" name="config[dkim_identity]" value="<?php echo esc_attr($this->config->get('dkim_identity', '')); ?>">
361 387 </div>
362 388
363 389 <label for="dkim_public" class="cell large-2 medium-3">
364 - <?php echo acym_translation('ACYM_DKIM_PUBLIC'); ?>
390 + <?php echo esc_html(acym_translation('ACYM_DKIM_PUBLIC')); ?>
365 391 </label>
366 392 <div class="cell large-10 medium-9">
367 - <textarea id="dkim_public" name="config[dkim_public]"><?php echo $this->config->get('dkim_public', ''); ?></textarea>
393 + <textarea id="dkim_public" name="config[dkim_public]"><?php echo esc_html($this->config->get('dkim_public', '')); ?></textarea>
368 394 </div>
369 395 </div>
370 396 </div>
371 397 <?php
372 398 } else {
399 + //Be compatible with what we used to have:
373 400 $publicKey = 'v=DKIM1;s=email;t=s;p='.trim($this->config->get('dkim_public', ''), '"');
374 401
375 - echo acym_translationSprintf(
376 - 'ACYM_DKIM_CONFIGURE',
377 - '<input class="margin-bottom-0" type="text" id="dkim_domain" name="config[dkim_domain]" value="'.acym_escape($domain).'" />'
402 + echo wp_kses(
403 + acym_translationSprintf(
404 + 'ACYM_DKIM_CONFIGURE',
405 + '<input class="margin-bottom-0" type="text" id="dkim_domain" name="config[dkim_domain]" value="'.esc_attr($domain).'" />'
406 + ),
407 + [
408 + 'input' => [
409 + 'class' => true,
410 + 'type' => true,
411 + 'id' => true,
412 + 'name' => true,
413 + 'value' => true,
414 + ],
415 + ]
378 416 );
379 417 ?>
380 418 <div class="cell">
381 - <?php echo acym_translation('ACYM_DKIM_KEY'); ?>
419 + <?php echo esc_html(acym_translation('ACYM_DKIM_KEY')); ?>
382 420 <input id="dkim_key" class="acym_autoselect margin-bottom-0" type="text" readonly="readonly" value="acy._domainkey" />
383 421 </div>
384 422 <div class="cell">
385 - <?php echo acym_translation('ACYM_DKIM_VALUE'); ?>
386 - <input id="dkim_value" class="acym_autoselect margin-bottom-0" type="text" readonly="readonly" value="<?php echo acym_escape($publicKey); ?>" />
423 + <?php echo esc_html(acym_translation('ACYM_DKIM_VALUE')); ?>
424 + <input id="dkim_value" class="acym_autoselect margin-bottom-0" type="text" readonly="readonly" value="<?php echo esc_attr($publicKey); ?>" />
387 425 </div>
388 426 <div class="cell">
389 427 <input type="checkbox" value="1" id="dkimletme" name="dkimletme" />
390 - <label for="dkimletme"><?php echo acym_translation('ACYM_DKIM_LET_ME'); ?></label>
428 + <label for="dkimletme"><?php echo esc_html(acym_translation('ACYM_DKIM_LET_ME')); ?></label>
391 429 </div>
392 430 <?php
393 431 }
394 432 ?>
@@ -393,12 +431,13 @@
393 431 }
394 432 ?>
395 433
396 434 <div class="cell">
397 - <a class="button button-secondary margin-bottom-0 margin-top-1" target="_blank" href="<?php echo ACYM_DOCUMENTATION; ?>setup/configuration/mail-configuration/dkim">
398 - <?php echo acym_translation('ACYM_HELP'); ?>
435 + <a class="button button-secondary margin-bottom-0 margin-top-1"
436 + target="_blank"
437 + href="<?php echo esc_url(ACYM_DOCUMENTATION); ?>setup/configuration/mail-configuration/dkim">
438 + <?php echo esc_html(acym_translation('ACYM_HELP')); ?>
399 439 </a>
400 440 </div>
401 441 </div>
402 442 </div>
403 -
404 443 </div>