Commit a173d727 authored by catch's avatar catch

Revert "Issue #2598502 by alexpott: Double escaping in views attachment titles"

This reverts commit 2748b9a4.
parent 1e8c0d38
......@@ -143,8 +143,6 @@ function testThemedEntity() {
$this->drupalGet($path);
$this->assertResponse(200);
$this->assertNoRaw($this->xssLabel);
// Ensure there is no double escaping.
$this->assertNoEscaped('<');
}
}
}
......
......@@ -232,10 +232,6 @@ public function getRowClass($row_index) {
/**
* Take a value and apply token replacement logic to it.
*
* @return \Drupal\views\Render\ViewsRenderPipelineMarkup
* The value with tokens replaced and wrapped in a ViewsRenderPipelineMarkup
* object. The value will have been XSS admin filtered.
*/
public function tokenizeValue($value, $row_index) {
if (strpos($value, '{{') !== FALSE) {
......@@ -252,7 +248,7 @@ public function tokenizeValue($value, $row_index) {
// resulting string. We do the same here for consistency.
$value = Xss::filterAdmin($value);
}
return ViewsRenderPipelineMarkup::create($value);
return $value;
}
/**
......
langcode: en
status: true
dependencies: { }
dependencies:
module:
- user
id: test_attachment_ui
label: null
module: views
description: ''
tag: ''
base_table: views_test_data
base_field: ''
base_field: nid
core: '8'
display:
default:
display_options:
access:
type: none
type: perm
options:
perm: 'views_test_data test permission'
cache:
type: tag
exposed_form:
......@@ -30,47 +34,15 @@ display:
table: views_test_data
field: id
plugin_id: numeric
display_extenders: { }
display_plugin: default
display_title: Master
id: default
position: 0
cache_metadata:
max-age: -1
contexts:
- 'languages:language_interface'
- url.query_args
tags: { }
attachment_1:
display_plugin: attachment
display_title: Attachment
id: attachment_1
position: 1
display_options:
title: '<em>Markup</em>'
display_extenders: { }
defaults:
title: false
header: false
header:
area:
id: area
table: views
field: area
relationship: none
group_type: group
admin_label: ''
empty: true
tokenize: false
content:
value: 'Attachment title: [view:title]'
format: plain_text
plugin_id: text
cache_metadata:
max-age: -1
contexts:
- 'languages:language_interface'
tags: { }
feed_1:
display_plugin: feed
id: feed_1
......@@ -93,23 +65,10 @@ display:
guid_field: id
guid_field_is_permalink: false
path: test_attachment_ui_feed
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_interface'
tags: { }
page_1:
display_plugin: page
display_title: '<em>Page</em>'
display_title: <em>Page</em>
display_options:
path: test_attachment_ui
display_extenders: { }
id: page_1
position: 2
cache_metadata:
max-age: -1
contexts:
- 'languages:language_interface'
- url.query_args
tags: { }
......@@ -61,10 +61,5 @@ public function testAttachmentUI() {
$view = Views::getView('test_attachment_ui');
$view->initDisplay();
$this->assertEqual(array_keys($view->displayHandlers->get('attachment_1')->getOption('displays')), array('default', 'page_1'), 'The attached displays got saved as expected');
// The attachment title should be escaped as it is using the plain text
// formatter.
$this->drupalGet('test_attachment_ui');
$this->assertEscaped('Attachment title: <em>Markup</em>');
}
}
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