diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/field/Link.php b/core/modules/node/lib/Drupal/node/Plugin/views/field/Link.php index 137c948..819b8dd 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/field/Link.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/field/Link.php @@ -60,7 +60,7 @@ protected function renderLink($node, ResultRow $values) { if (node_access('view', $node)) { $this->options['alter']['make_link'] = TRUE; $this->options['alter']['path'] = 'node/' . $node->id(); - $text = !empty($this->options['text']) ? $this->options['text'] : t('view'); + $text = !empty($this->options['text']) ? $this->sanitizeValue($this->options['text']) : t('view'); return $text; } } diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLink.php b/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLink.php index eace8b7..1941271 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLink.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLink.php @@ -24,7 +24,7 @@ class RevisionLink extends Link { public $countRevisions; /** - * Overrides Drupal\views\Plugin\views\field\FieldPluginBase::init(). + * {@inheritdoc} */ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); @@ -34,7 +34,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o } /** - * Overrides \Drupal\views\Plugin\views\field::pre_render(). + * {@inheritdoc} */ function preRender(&$values) { parent::preRender($values); @@ -50,6 +50,9 @@ function preRender(&$values) { } } + /** + * {@inheritdoc} + */ protected function renderLink($data, ResultRow $values) { list($node, $revision_node, $vid) = $this->get_revision_entity($values, 'view'); if (!isset($vid)) { diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLinkDelete.php b/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLinkDelete.php index c91b9f9..152241b 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLinkDelete.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLinkDelete.php @@ -20,6 +20,9 @@ */ class RevisionLinkDelete extends RevisionLink { + /** + * {@inheritdoc} + */ protected function renderLink($data, ResultRow $values) { list($node, $revision_node, $vid) = $this->get_revision_entity($values, 'update'); @@ -37,7 +40,7 @@ protected function renderLink($data, ResultRow $values) { $this->options['alter']['path'] = 'node/' . $node->id() . "/revisions/$vid/delete"; $this->options['alter']['query'] = drupal_get_destination(); - return !empty($this->options['text']) ? $this->options['text'] : t('Delete'); + return !empty($this->options['text']) ? $this->sanitizeValue($this->options['text']) : t('Delete'); } } diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLinkRevert.php b/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLinkRevert.php index 361b770..4f2c884 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLinkRevert.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLinkRevert.php @@ -20,6 +20,9 @@ */ class RevisionLinkRevert extends RevisionLink { + /** + * {@inheritdoc} + */ protected function renderLink($data, ResultRow $values) { list($node, $revision_node, $vid) = $this->get_revision_entity($values, 'update'); @@ -37,7 +40,7 @@ protected function renderLink($data, ResultRow $values) { $this->options['alter']['path'] = 'node/' . $node->id() . "/revisions/$vid/revert"; $this->options['alter']['query'] = drupal_get_destination(); - return !empty($this->options['text']) ? $this->options['text'] : t('Revert'); + return !empty($this->options['text']) ? $this->sanitizeValue($this->options['text']) : t('Revert'); } }