Hi,
I use Netspace and I've been getting the same errors (v1.09) when trying to delete a record after a search. Having looked at the scripts I've found the following solution:
Edit /mysqlman/GT/CGI.pm - and replace this:
sub html_escape {
#--------------------------------------------------------------------------------
# Return the string html_escaped.
#
my $toencode = (defined $_[0] and ((ref $_[0] eq 'GT::CGI') or ($_[0] eq 'GT::CGI'))) ? $_[1] : $_[0];
return unless (defined $toencode);
if (ref($toencode) eq 'SCALAR') {
$$toencode =~ s/&/&/g;
$$toencode =~ s/</</g;
$$toencode =~ s/>/>/g;
$$toencode =~ s/"/"/g;
}
else {
$toencode =~ s/&/&/g;
$toencode =~ s/</</g;
$toencode =~ s/>/>/g;
$toencode =~ s/"/"/g;
}
return $toencode;
}
... with this ...
sub html_escape {
#--------------------------------------------------------------------------------
# Return the string html_escaped.
#
my $toencode = (defined $_[0] and ((ref $_[0] eq 'GT::CGI') or ($_[0] eq 'GT::CGI'))) ? $_[1] : $_[0];
return unless (defined $toencode);
if (ref($toencode) eq 'SCALAR') {
$$toencode =~ s/&/&/g;
$$toencode =~ s/</</g;
$$toencode =~ s/>/>/g;
$$toencode =~ s/"/"/g;
$$toencode =~ s/ /%20/g;
}
else {
$toencode =~ s/&/&/g;
$toencode =~ s/</</g;
$toencode =~ s/>/>/g;
$toencode =~ s/"/"/g;
$toencode =~ s/ /%20/g;
}
return $toencode;
}
This makes the delete URL encode properly for the browser.
My only question is - would this change effect any of the other functions of MySQLMan?
All the best
Shaun
I use Netspace and I've been getting the same errors (v1.09) when trying to delete a record after a search. Having looked at the scripts I've found the following solution:
Edit /mysqlman/GT/CGI.pm - and replace this:
sub html_escape {
#--------------------------------------------------------------------------------
# Return the string html_escaped.
#
my $toencode = (defined $_[0] and ((ref $_[0] eq 'GT::CGI') or ($_[0] eq 'GT::CGI'))) ? $_[1] : $_[0];
return unless (defined $toencode);
if (ref($toencode) eq 'SCALAR') {
$$toencode =~ s/&/&/g;
$$toencode =~ s/</</g;
$$toencode =~ s/>/>/g;
$$toencode =~ s/"/"/g;
}
else {
$toencode =~ s/&/&/g;
$toencode =~ s/</</g;
$toencode =~ s/>/>/g;
$toencode =~ s/"/"/g;
}
return $toencode;
}
... with this ...
sub html_escape {
#--------------------------------------------------------------------------------
# Return the string html_escaped.
#
my $toencode = (defined $_[0] and ((ref $_[0] eq 'GT::CGI') or ($_[0] eq 'GT::CGI'))) ? $_[1] : $_[0];
return unless (defined $toencode);
if (ref($toencode) eq 'SCALAR') {
$$toencode =~ s/&/&/g;
$$toencode =~ s/</</g;
$$toencode =~ s/>/>/g;
$$toencode =~ s/"/"/g;
$$toencode =~ s/ /%20/g;
}
else {
$toencode =~ s/&/&/g;
$toencode =~ s/</</g;
$toencode =~ s/>/>/g;
$toencode =~ s/"/"/g;
$toencode =~ s/ /%20/g;
}
return $toencode;
}
This makes the delete URL encode properly for the browser.
My only question is - would this change effect any of the other functions of MySQLMan?
All the best
Shaun