Skip to content

Commit

Permalink
let punycode_decode do all the work (closes #856)
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 21, 2015
1 parent 2861e7a commit c8908dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojo/URL.pm
Expand Up @@ -54,7 +54,7 @@ sub ihost {

# Decode
return $self->host(join '.',
map { /^xn--(.+)$/ ? punycode_decode($_) : $_ } split(/\./, shift, -1))
map { /^xn--/ ? punycode_decode $_ : $_ } split(/\./, shift, -1))
if @_;

# Check if host needs to be encoded
Expand Down

0 comments on commit c8908dd

Please sign in to comment.