use Scalar::Util qw(blessed);
use IO::All;
use JSON;
+use URI::Escape;
has root => (is => 'lazy');
sub link_to {
my ($self, @to) = @_;
use HTML::Tags;
- s/\//\./g for my @link = @to;
+ my @link = map uri_escape(uri_escape($_)), @to;
my $link = join('/', @link, '');
my $to = $to[-1];
my $html = join '', HTML::Tags::to_html_string(
$target = $self->json->decode(scalar $target->all);
}
return $target unless @path;
- (my $undot = my $step = shift @path) =~ s/\./\//g;
- $self->descend($target->{$step}||$target->{$undot}, @path);
+ my $step = uri_unescape(uri_unescape( shift @path));
+ $self->descend($target->{$step}, @path);
}
sub render_table {