* Jason Galea <[email protected]> [2009-10-26 23:45]:
> On Sun, Oct 25, 2009 at 12:49 AM, Aristotle Pagaltzis <[email protected]>wrote:
> > * Jason Galea <[email protected]> [2009-10-21 01:50]:
> > >   $c->res->header( 'Content-Disposition' => 
> > > 'attachment;filename='.$c->stash->{pdf_filename} );
> >
> > This will break for filenames with spaces in them. For strict
> > correctness, you want this:
> >
> >    ( my $pdf_filename = $c->stash->{ pdf_filename } ) =~ s!"!\\"!g;
> >    $c->res->header( 'Content-Disposition' => qq(attachment; 
> > filename="$pdf_filename") );
                                                                         ^      
       ^
                                                                         ^      
       ^

> hmm.. I'm missing something here...

Yup.

> won't that simply escape double quotes and not affect spaces?

No.

:-)

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to