Skip to content
Snippets Groups Projects
Commit 7b948696 authored by Jess's avatar Jess
Browse files

Issue #2501451 by Cottser, joelpittet: Document SafeMarkup::set in drupal_get_messages()

parent 38833e0f
No related branches found
No related tags found
No related merge requests found
...@@ -606,6 +606,10 @@ function drupal_get_messages($type = NULL, $clear_queue = TRUE) { ...@@ -606,6 +606,10 @@ function drupal_get_messages($type = NULL, $clear_queue = TRUE) {
if ($messages = drupal_set_message()) { if ($messages = drupal_set_message()) {
foreach ($messages as $message_type => $message_typed_messages) { foreach ($messages as $message_type => $message_typed_messages) {
foreach ($message_typed_messages as $key => $message) { foreach ($message_typed_messages as $key => $message) {
// Because the messages are stored in the session, the safe status of
// the messages also needs to be stored in the session. We retrieve the
// safe status here and determine whether to mark the string as safe or
// let autoescape do its thing. See drupal_set_message().
if ($message['safe']) { if ($message['safe']) {
$message['message'] = SafeMarkup::set($message['message']); $message['message'] = SafeMarkup::set($message['message']);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment