Mercurial > pub > Impl
comparison Lib/IMPL/Web/AutoLocator.pm @ 403:7171a8e2e2ba
dirty fix for url encoding
author | sergey |
---|---|
date | Tue, 20 May 2014 01:26:45 +0400 |
parents | 793cc7f0a7e7 |
children |
comparison
equal
deleted
inserted
replaced
402:b79081b70a7a | 403:7171a8e2e2ba |
---|---|
36 my $this = shift; | 36 my $this = shift; |
37 my $child = shift or die ArgumentException->new("a child resource identifier is required"); | 37 my $child = shift or die ArgumentException->new("a child resource identifier is required"); |
38 die ArgumentException->new("a child resource can't be a reference") if ref $child; | 38 die ArgumentException->new("a child resource can't be a reference") if ref $child; |
39 | 39 |
40 # safe | 40 # safe |
41 $child = uri_escape($child); | 41 #$child = uri_escape_utf8($child); |
42 | 42 |
43 my %args; | 43 my %args; |
44 | 44 |
45 $args{base} = $this->base =~ /\/$/ ? $this->base . $child : $this->base . '/' . $child; | 45 $args{base} = $this->base =~ /\/$/ ? $this->base . $child : $this->base . '/' . $child; |
46 $args{view} = $this->view if $this->view; | 46 $args{view} = $this->view if $this->view; |
59 my $this = shift; | 59 my $this = shift; |
60 my $child = shift or die ArgumentException->new("a child resource identifier is required"); | 60 my $child = shift or die ArgumentException->new("a child resource identifier is required"); |
61 die ArgumentException->new("a child resource can't be a reference") if ref $child; | 61 die ArgumentException->new("a child resource can't be a reference") if ref $child; |
62 | 62 |
63 # safe | 63 # safe |
64 $child = uri_escape($child); | 64 #$child = uri_escape($child); |
65 | 65 |
66 my %args; | 66 my %args; |
67 | 67 |
68 if($this->base =~ /(.*?)(\/[^\/]*)?$/) { | 68 if($this->base =~ /(.*?)(\/[^\/]*)?$/) { |
69 $args{base} = join('/',$1,$child); | 69 $args{base} = join('/',$1,$child); |