From 66493d5e7e811c387faefd8f27edadcaf762c829 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Sat, 21 Sep 2002 22:17:03 +0000 Subject: Bug 108987 - Linkify script to use quoteUrls on texts provided by user. Patch by gerv; r=kiko. --- page.cgi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'page.cgi') diff --git a/page.cgi b/page.cgi index af0903c30..960774cc4 100755 --- a/page.cgi +++ b/page.cgi @@ -39,11 +39,14 @@ ConnectToDatabase(); quietly_check_login(); -if (defined $::FORM{'id'}) { +if ($::FORM{'id'}) { + # Remove all dodgy chars, and split into name and ctype. $::FORM{'id'} =~ s/[^\w\-\.]//g; - $::FORM{'id'} =~ /(.*)(\.(.*))?/; + $::FORM{'id'} =~ /(.*)\.(.*)/; - my $format = GetFormat($1, undef, $3); + my $format = GetFormat($1, undef, $2); + + $vars->{'form'} = \%::FORM; print "Content-Type: $format->{'ctype'}\n\n"; -- cgit v1.2.1