Issue #2599956 by claudiu.cristea, apmsooner: Handler admin summary is double escaped

8.3.x
Alex Pott 2017-01-11 11:11:10 +00:00
parent 49e21afcaf
commit b149b639b9
2 changed files with 6 additions and 2 deletions

View File

@ -4,7 +4,6 @@ namespace Drupal\views_ui;
use Drupal\Component\Utility\Html;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Component\Utility\Xss;
use Drupal\Core\Ajax\AjaxResponse;
use Drupal\Core\Ajax\HtmlCommand;
use Drupal\Core\Ajax\ReplaceCommand;
@ -1056,7 +1055,7 @@ class ViewEditForm extends ViewFormBase {
$field_name = '(' . $relationships[$field['relationship']] . ') ' . $field_name;
}
$description = Xss::filterAdmin($handler->adminSummary());
$description = $handler->adminSummary();
$link_text = $field_name . (empty($description) ? '' : " ($description)");
$link_attributes = array('class' => array('views-ajax-link'));
if (!empty($field['exclude'])) {

View File

@ -66,6 +66,11 @@ class FilterCriteriaTest extends JavascriptTestBase {
$assert_session->assertWaitOnAjaxRequest();
$remove_link = $page->findLink('Remove group');
$this->assertEmpty($remove_link, 'Remove button not available');
// Checks that the admin summary is not double escaped.
$this->drupalGet('admin/structure/views/view/who_s_online');
$page = $this->getSession()->getPage();
$this->assertNotNull($page->findLink('User: Last access (>= -15 minutes)'));
}
}