Navigation Menu

Skip to content

Commit

Permalink
find entities a little faster
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jun 7, 2016
1 parent e31dfdb commit 25877e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Mojo/Util.pm
Expand Up @@ -369,10 +369,10 @@ sub _decode {
# Named character reference
my $rest = '';
while (length $name) {
return "$ENTITIES{$name}$rest" if exists $ENTITIES{$name};
$rest = chop($name) . $rest;
return $ENTITIES{$name} . reverse $rest if exists $ENTITIES{$name};
$rest .= chop $name;
}
return "&$rest";
return '&' . reverse $rest;
}

sub _encoding {
Expand Down

0 comments on commit 25877e8

Please sign in to comment.