| @@ -1,8 +1,9 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | defined('ABSPATH') || die('Restricted Access'); |
| 3 | 3 | |
| 4 | 4 | use AcyMailing\Classes\ConfigurationClass; |
| 5 | +use AcyMailing\Helpers\SecurityHelper; | |
| 5 | 6 | |
| 6 | 7 | /** |
| 7 | 8 | * @param ?mixed $arg |
| 8 | 9 | */ |
| @@ -76,10 +77,9 @@ | ||
| 76 | 77 | $config = acym_config(); |
| 77 | 78 | $remindme = json_decode($config->get('remindme', '[]'), true); |
| 78 | 79 | foreach ($messages as $id => $message) { |
| 79 | 80 | if (strpos($message, 'acym__do__not__remindme') !== false) { |
| 80 | - preg_match('/title="(.*)"/Ui', $message, $matches); | |
| 81 | - if (in_array($matches[1], $remindme)) { | |
| 81 | + if (preg_match('/title="(.*)"/Ui', $message, $matches) && in_array($matches[1], $remindme)) { | |
| 82 | 82 | continue; |
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | |
| @@ -86,9 +86,9 @@ | ||
| 86 | 86 | echo '<div class="acym__message grid-x acym__message__'.esc_attr($type).'">'; |
| 87 | 87 | |
| 88 | 88 | if (is_array($message)) $message = implode('</div><div>', $message); |
| 89 | 89 | |
| 90 | - echo '<div class="cell auto"><div>'.$message.'</div></div>'; | |
| 90 | + echo '<div class="cell auto"><div>'.wp_kses($message, SecurityHelper::ALLOWED_HTML_MESSAGE).'</div></div>'; | |
| 91 | 91 | |
| 92 | 92 | if ($close && strpos($message, 'acym__do__not__remindme') === false) { |
| 93 | 93 | echo '<i data-id="'.esc_attr($id).'" class="cell shrink acym__message__close acymicon-close"></i>'; |
| 94 | 94 | } |