summaryrefslogtreecommitdiff
path: root/src/HTML5/Parser/CharacterReference.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/HTML5/Parser/CharacterReference.php')
-rw-r--r--src/HTML5/Parser/CharacterReference.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/HTML5/Parser/CharacterReference.php b/src/HTML5/Parser/CharacterReference.php
index cc71f8f..ea6a527 100644
--- a/src/HTML5/Parser/CharacterReference.php
+++ b/src/HTML5/Parser/CharacterReference.php
@@ -19,9 +19,8 @@ class CharacterReference {
* The character sequence. In UTF-8 this may be more than one byte.
*/
public static function lookupName($name) {
- $char = Entities::$byName[$name];
-
- return $char;
+ // Do we really want to return NULL here? or FFFD
+ return isset(Entities::$byName[$name]) ? Entities::$byName[$name] : NULL;
}
/**