- 🇮🇳India Abhisheksingh27
Reuploading the previous patch after removing unnecessary whitespaces
- Status changed to Needs work
almost 2 years ago 7:15pm 1 March 2023 - 🇺🇸United States smustgrave
Issue summary is full of todos which need to be addressed
todo
Todo
todo
Update issue summary.
Review code
Manual test
Commit
Translation on log messages page
NA
NA
NA
I haven't tested this, but @hgoto has done some equivalent testing on a Drupal 7 patch that would have done what Drupal 8 does now (see #2459339: Log messages should be XSS filtered on display → ) and the problem occurred then.
Because https://api.drupal.org/api/drupal/core%21modules%21dblog%21src%21Control... does this:
$message = $this->t(Xss::filterAdmin($row->message), unserialize($row->variables));
It suggests that if the message has any characters which get altered by Xss:filterAdmin() (such as <
, >
or &
) then the message won't be properly translated, and the entire message will appear in English when viewing the logs even when the site is being viewed in a different language.
The solution of running Xss::filterAdmin() on the result of $this->t() instead was discussed in the above issue. It was rejected at the time, but I'm not sure the reasons for rejecting it are relevant anymore. Doing that should fix this.
@hgoto has an initial Drupal 8 patch for this at #2459339-29: Log messages should be XSS filtered on display →
Needs work
10.1 ✨
It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.
Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.
Used to track the progress of issues reviewed by the Drupal Needs Review Queue Initiative.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Reuploading the previous patch after removing unnecessary whitespaces
Issue summary is full of todos which need to be addressed