You are here

public function HtmlTest::providerDecodeEntities in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Component/Utility/HtmlTest.php \Drupal\Tests\Component\Utility\HtmlTest::providerDecodeEntities()

Data provider for testDecodeEntities().

See also

testDecodeEntities()

File

core/tests/Drupal/Tests/Component/Utility/HtmlTest.php, line 246

Class

HtmlTest
Tests \Drupal\Component\Utility\Html.

Namespace

Drupal\Tests\Component\Utility

Code

public function providerDecodeEntities() {
  return [
    [
      'Drupal',
      'Drupal',
    ],
    [
      '<script>',
      '<script>',
    ],
    [
      '&lt;script&gt;',
      '<script>',
    ],
    [
      '&#60;script&#62;',
      '<script>',
    ],
    [
      '&amp;lt;script&amp;gt;',
      '&lt;script&gt;',
    ],
    [
      '"',
      '"',
    ],
    [
      '&#34;',
      '"',
    ],
    [
      '&amp;#34;',
      '&#34;',
    ],
    [
      '&quot;',
      '"',
    ],
    [
      '&amp;quot;',
      '&quot;',
    ],
    [
      "'",
      "'",
    ],
    [
      '&#39;',
      "'",
    ],
    [
      '&amp;#39;',
      '&#39;',
    ],
    [
      '©',
      '©',
    ],
    [
      '&copy;',
      '©',
    ],
    [
      '&#169;',
      '©',
    ],
    [
      '→',
      '→',
    ],
    [
      '&#8594;',
      '→',
    ],
    [
      '➼',
      '➼',
    ],
    [
      '&#10172;',
      '➼',
    ],
    [
      '&euro;',
      '€',
    ],
  ];
}