Skip to content

Commit

Permalink
mention %2F handling in Mojo::Path documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 9, 2012
1 parent aaccb35 commit 30efa54
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/Mojo/Path.pm
Expand Up @@ -116,7 +116,7 @@ Mojo::Path - Path
use Mojo::Path;
my $path = Mojo::Path->new('/foo/bar%3B/baz.html');
my $path = Mojo::Path->new('/foo%2Fbar%3B/baz.html');
shift @{$path->parts};
say $path;
Expand All @@ -142,6 +142,9 @@ Path has a leading slash.
The path parts.
# Part with slash
push @{$path->parts}, 'foo/bar';
=head2 C<trailing_slash>
my $trailing_slash = $path->trailing_slash;
Expand All @@ -157,7 +160,7 @@ following new ones.
=head2 C<new>
my $path = Mojo::Path->new;
my $path = Mojo::Path->new('/foo/bar%3B/baz.html');
my $path = Mojo::Path->new('/foo%2Fbar%3B/baz.html');
Construct a new L<Mojo::Path> object.
Expand Down Expand Up @@ -194,9 +197,9 @@ Check if path contains given prefix.
=head2 C<parse>
$path = $path->parse('/foo/bar%3B/baz.html');
$path = $path->parse('/foo%2Fbar%3B/baz.html');
Parse path.
Parse path. Note that C<%2F> will be treated as C</> for security reasons.
=head2 C<to_abs_string>
Expand Down

0 comments on commit 30efa54

Please sign in to comment.