|
static | decodeCharReferences ($text) |
| Decode any character references, numeric or named entities, in the text and return a UTF-8 string. More...
|
|
static | decodeCharReferencesCallback ($matches) |
|
static | decodeChar ($codepoint) |
| Return UTF-8 string for a codepoint if that is a valid character reference, otherwise U+FFFD REPLACEMENT CHARACTER. More...
|
|
static | decodeEntity ($name) |
| If the named entity is defined in the HTML 4.0/XHTML 1.0 DTD, return the UTF-8 encoding of that character. More...
|
|
Definition at line 347 of file Sanitizer.php.
◆ decodeChar()
static Sanitizer::decodeChar |
( |
|
$codepoint | ) |
|
|
static |
Return UTF-8 string for a codepoint if that is a valid character reference, otherwise U+FFFD REPLACEMENT CHARACTER.
- Parameters
-
- Returns
- string
Definition at line 408 of file Sanitizer.php.
static validateCodepoint($codepoint)
Returns true if a given Unicode codepoint is a valid character in XML.
◆ decodeCharReferences()
static Sanitizer::decodeCharReferences |
( |
|
$text | ) |
|
|
static |
Decode any character references, numeric or named entities, in the text and return a UTF-8 string.
- Parameters
-
- Returns
- string
Definition at line 373 of file Sanitizer.php.
Referenced by Title\newFromText().
379 return preg_replace_callback(
const MW_CHAR_REFS_REGEX
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ decodeCharReferencesCallback()
static Sanitizer::decodeCharReferencesCallback |
( |
|
$matches | ) |
|
|
static |
- Parameters
-
- Returns
- string
Definition at line 386 of file Sanitizer.php.
392 if ($matches[1] !=
'') {
394 } elseif ($matches[2] !=
'') {
396 } elseif ($matches[3] !=
'') {
398 } elseif ($matches[4] !=
'') {
static decodeChar($codepoint)
Return UTF-8 string for a codepoint if that is a valid character reference, otherwise U+FFFD REPLACEM...
static decodeEntity($name)
If the named entity is defined in the HTML 4.0/XHTML 1.0 DTD, return the UTF-8 encoding of that chara...
◆ decodeEntity()
static Sanitizer::decodeEntity |
( |
|
$name | ) |
|
|
static |
If the named entity is defined in the HTML 4.0/XHTML 1.0 DTD, return the UTF-8 encoding of that character.
Otherwise, returns pseudo-entity source (eg )
- Parameters
-
- Returns
- string
Definition at line 426 of file Sanitizer.php.
434 if (isset($wgHtmlEntityAliases[$name])) {
435 $name = $wgHtmlEntityAliases[$name];
437 if (isset($wgHtmlEntities[$name])) {
global $wgHtmlEntities
List of all named character entities defined in HTML 4.01 http://www.w3.org/TR/html4/sgml/entities.html.
global $wgHtmlEntityAliases
Character entity aliases accepted by MediaWiki.
◆ validateCodepoint()
static Sanitizer::validateCodepoint |
( |
|
$codepoint | ) |
|
|
staticprivate |
Returns true if a given Unicode codepoint is a valid character in XML.
- Parameters
-
- Returns
- bool
Definition at line 354 of file Sanitizer.php.
360 return ($codepoint == 0x09)
361 || ($codepoint == 0x0a)
362 || ($codepoint == 0x0d)
The documentation for this class was generated from the following file: