function data_policy_preprocess_status_messages in Data Policy 8
Implements hook_preprocess_HOOK().
File
- ./
data_policy.module, line 195 - data_policy.module
Code
function data_policy_preprocess_status_messages(&$variables) {
if (isset($variables['message_list']['error'])) {
$error_messages = $variables['message_list']['error'];
foreach ($error_messages as $delta => $message) {
/** @var \Drupal\Core\Render\Markup $message */
if (strpos((string) $message, '<a href="#edit-data-policy-data-policy-') !== FALSE) {
$variables['message_list']['error'][$delta] = Markup::create(html_entity_decode((string) $message));
}
}
}
}