Loading core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { foreach ($this->entities as $entity) { $row = $this->buildRow($entity); if (isset($row['label'])) { $row['label'] = ['#markup' => $row['label']]; $row['label'] = ['#plain_text' => $row['label']]; } if (isset($row['weight'])) { $row['weight']['#delta'] = $delta; Loading core/modules/config/tests/src/Functional/ConfigDraggableListBuilderTest.php +8 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Drupal\Tests\config\Functional; use Drupal\Component\Utility\Html; use Drupal\Tests\BrowserTestBase; use Drupal\user\Entity\Role; Loading Loading @@ -49,6 +50,13 @@ public function testDraggableList() { for ($i = 0; $i < 51; $i++) { $this->assertSession()->pageTextContains("Role $i"); } $role = Role::load('role_0'); $role_name = 'Role <b>0</b>'; $role->set('label', $role_name)->save(); $this->drupalGet('admin/people/roles'); $this->assertSession()->responseContains('<td>' . Html::escape($role_name)); } } Loading
core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { foreach ($this->entities as $entity) { $row = $this->buildRow($entity); if (isset($row['label'])) { $row['label'] = ['#markup' => $row['label']]; $row['label'] = ['#plain_text' => $row['label']]; } if (isset($row['weight'])) { $row['weight']['#delta'] = $delta; Loading
core/modules/config/tests/src/Functional/ConfigDraggableListBuilderTest.php +8 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Drupal\Tests\config\Functional; use Drupal\Component\Utility\Html; use Drupal\Tests\BrowserTestBase; use Drupal\user\Entity\Role; Loading Loading @@ -49,6 +50,13 @@ public function testDraggableList() { for ($i = 0; $i < 51; $i++) { $this->assertSession()->pageTextContains("Role $i"); } $role = Role::load('role_0'); $role_name = 'Role <b>0</b>'; $role->set('label', $role_name)->save(); $this->drupalGet('admin/people/roles'); $this->assertSession()->responseContains('<td>' . Html::escape($role_name)); } }