X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=c2e925b2738c63915cbfe5c1388b9f9bb77edca1;hb=f9451270ac09ec79f7185213288c927501010d1f;hp=e238bd10cdcc4e99e4802a68df7e99c63228d6e0;hpb=02f4beca58b1404df223b0e7f3cd960f71010f9a;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index e238bd1..c2e925b 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -23,6 +23,7 @@ use Path::Class::File (); use URI (); use URI::http; use URI::https; +use HTML::Entities; use Tree::Simple qw/use_weak_refs/; use Tree::Simple::Visitor::FindByUID; use Class::C3::Adopt::NEXT; @@ -112,7 +113,7 @@ __PACKAGE__->stats_class('Catalyst::Stats'); # Remember to update this in Catalyst::Runtime as well! -our $VERSION = '5.90018'; +our $VERSION = '5.90020'; sub import { my ( $class, @arguments ) = @_; @@ -1340,10 +1341,14 @@ sub uri_for { # join args with '/', or a blank string my $args = join('/', grep { defined($_) } @args); $args =~ s/\?/%3F/g; # STUPID STUPID SPECIAL CASE - $args =~ s!^/+!!; - my $base = $c->req->base; - my $class = ref($base); - $base =~ s{(?req->base; + $class = ref($base); + $base =~ s{(?has_body ) { # Add a default body if none is already present + my $encoded_location = encode_entities($location); $response->body(<<"EOF"); @@ -1876,7 +1882,7 @@ sub finalize_headers { Moved -

This item has moved here.

+

This item has moved here.

EOF