comparison vendor/masterminds/html5/src/HTML5/Serializer/HTML5Entities.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
1 <?php 1 <?php
2 /** 2 /**
3 * @file 3 * @file
4 * This contains HTML5 entities to use with serializing. 4 * This contains HTML5 entities to use with serializing.
5 * 5 *
6 * The list here is mildly different from the list at \Masterminds\HTML5\Entities because 6 * The list here is mildly different from the list at Entities because
7 * that list was generated from the w3c. It contains some entities that are 7 * that list was generated from the w3c. It contains some entities that are
8 * not entirely proper such as &am; which maps to &. This list is meant to be 8 * not entirely proper such as &am; which maps to &. This list is meant to be
9 * a fallback for PHP versions prior to PHP 5.4 when dealing with encoding. 9 * a fallback for PHP versions prior to PHP 5.4 when dealing with encoding.
10 */ 10 */
11
11 namespace Masterminds\HTML5\Serializer; 12 namespace Masterminds\HTML5\Serializer;
12 13
13 /** 14 /**
14 * A mapping of entities to their html5 representation. 15 * A mapping of entities to their html5 representation.
15 * Used for older PHP 16 * Used for older PHP
16 * versions that don't have the mapping. 17 * versions that don't have the mapping.
17 */ 18 */
18 class HTML5Entities 19 class HTML5Entities
19 { 20 {
20
21 public static $map = array( 21 public static $map = array(
22 ' ' => '&Tab;', 22 ' ' => '&Tab;',
23 "\n" => '&NewLine;', 23 "\n" => '&NewLine;',
24 '!' => '&excl;', 24 '!' => '&excl;',
25 '"' => '&quot;', 25 '"' => '&quot;',
1526 '𝕦' => '&uopf;', 1526 '𝕦' => '&uopf;',
1527 '𝕧' => '&vopf;', 1527 '𝕧' => '&vopf;',
1528 '𝕨' => '&wopf;', 1528 '𝕨' => '&wopf;',
1529 '𝕩' => '&xopf;', 1529 '𝕩' => '&xopf;',
1530 '𝕪' => '&yopf;', 1530 '𝕪' => '&yopf;',
1531 '𝕫' => '&zopf;' 1531 '𝕫' => '&zopf;',
1532 ); 1532 );
1533 } 1533 }