Commit 17a23d94 authored by alexpott's avatar alexpott

Issue #2425581 by greg.1.anderson: !message in t() can lead to double-escaping...

Issue #2425581 by greg.1.anderson: !message in t() can lead to double-escaping when used in drupal_set_message()
parent e57b339e
......@@ -349,7 +349,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
}
catch (\Exception $e) {
$error = TRUE;
drupal_set_message($this->t('There was a problem creating field %label: !message', array('%label' => $values['label'], '!message' => $e->getMessage())), 'error');
drupal_set_message($this->t('There was a problem creating field %label: @message', array('%label' => $values['label'], '@message' => $e->getMessage())), 'error');
}
}
......@@ -379,7 +379,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
}
catch (\Exception $e) {
$error = TRUE;
drupal_set_message($this->t('There was a problem creating field %label: !message', array('%label' => $values['label'], '!message' => $e->getMessage())), 'error');
drupal_set_message($this->t('There was a problem creating field %label: @message', array('%label' => $values['label'], '@message' => $e->getMessage())), 'error');
}
}
......
......@@ -93,13 +93,13 @@ public function resetPass($uid, $timestamp, $hash) {
if ($account->isAuthenticated()) {
// The current user is already logged in.
if ($account->id() == $uid) {
drupal_set_message($this->t('You are logged in as %user. <a href="!user_edit">Change your password.</a>', array('%user' => $account->getUsername(), '!user_edit' => $this->url('entity.user.edit_form', array('user' => $account->id())))));
drupal_set_message($this->t('You are logged in as %user. <a href="@user_edit">Change your password.</a>', array('%user' => $account->getUsername(), '@user_edit' => $this->url('entity.user.edit_form', array('user' => $account->id())))));
}
// A different user is already logged in on the computer.
else {
if ($reset_link_user = $this->userStorage->load($uid)) {
drupal_set_message($this->t('Another user (%other_user) is already logged into the site on this computer, but you tried to use a one-time link for user %resetting_user. Please <a href="!logout">logout</a> and try using the link again.',
array('%other_user' => $account->getUsername(), '%resetting_user' => $reset_link_user->getUsername(), '!logout' => $this->url('user.logout'))));
drupal_set_message($this->t('Another user (%other_user) is already logged into the site on this computer, but you tried to use a one-time link for user %resetting_user. Please <a href="@logout">logout</a> and try using the link again.',
array('%other_user' => $account->getUsername(), '%resetting_user' => $reset_link_user->getUsername(), '@logout' => $this->url('user.logout'))));
}
else {
// Invalid one-time link specifies an unknown user.
......
......@@ -85,7 +85,7 @@ protected function initializePlugin($display_id) {
// display plugin isn't found.
catch (PluginException $e) {
$message = $e->getMessage();
drupal_set_message(t('!message', array('!message' => $message)), 'warning');
drupal_set_message(t('@message', array('@message' => $message)), 'warning');
}
// If no plugin instance has been created, return NULL.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment