diff --git a/core/modules/node/src/Controller/NodeController.php b/core/modules/node/src/Controller/NodeController.php index 67d86f1..99765e8 100644 --- a/core/modules/node/src/Controller/NodeController.php +++ b/core/modules/node/src/Controller/NodeController.php @@ -182,47 +182,18 @@ public function revisionOverview(NodeInterface $node) { '#theme' => 'username', '#account' => $revision_author, ); - $row[] = array( - 'data' => array( - '#type' => 'inline_template', - '#template' => '{{ current_revision_message }}', - '#context' => array( - 'current_revision_message' => $this->t('!date by !username !revision-log', - array( - '!date' => $node->link($this->dateFormatter->format($revision->revision_timestamp->value, 'short')), - '!username' => \Drupal::service('renderer')->render($username), - '!revision-log' => ($revision->revision_log->value != '') ? '
' . Xss::filter($revision->revision_log->value) . '
' : '', - ) - ), - ), - ), - 'class' => array('revision-current'), - ); - $row[] = array( - 'data' => SafeMarkup::placeholder($this->t('current revision')), - 'class' => array('revision-current'), - ); + $row[] = array('data' => SafeMarkup::set($this->t('!date by !username', array('!date' => $node->link($this->dateFormatter->format($revision->revision_timestamp->value, 'short')), '!username' => drupal_render($username))) + . (($revision->revision_log->value != '') ? '' . Xss::filter($revision->revision_log->value) . '
' : '')), + 'class' => array('revision-current')); + $row[] = array('data' => SafeMarkup::placeholder($this->t('current revision')), 'class' => array('revision-current')); } else { $username = array( '#theme' => 'username', '#account' => $revision_author, ); - $row[] = array( - 'data' => array( - '#type' => 'inline_template', - '#template' => '{{ old_revision_message }}', - '#context' => array( - 'old_revision_message' => $this->t('!date by !username !revision-log', - array( - '!date' => $this->l($this->dateFormatter->format($revision->revision_timestamp->value, 'short'), new Url('node.revision_show', array('node' => $node->id(), 'node_revision' => $vid))), - '!username' => \Drupal::service('renderer')->render($username), - '!revision-log' => ($revision->revision_log->value != '') ? '' . Xss::filter($revision->revision_log->value) . '
' : '', - ) - ), - ), - ), - ); + $row[] = SafeMarkup::set($this->t('!date by !username', array('!date' => $this->l($this->dateFormatter->format($revision->revision_timestamp->value, 'short'), new Url('node.revision_show', array('node' => $node->id(), 'node_revision' => $vid))), '!username' => drupal_render($username))) + . (($revision->revision_log->value != '') ? '' . Xss::filter($revision->revision_log->value) . '
' : '')); if ($revert_permission) { $links['revert'] = array(