From c97ad04509d3f96fd9928d88eb191f4a84808f42 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Wed, 14 Mar 2007 18:09:59 +0000 Subject: More documentation to DBObject, changed constructor format to use named params, and consolidated conditionals in LedgerSMB::escape git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@898 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'LedgerSMB.pm') diff --git a/LedgerSMB.pm b/LedgerSMB.pm index ab771eb1..4fe53d2e 100755 --- a/LedgerSMB.pm +++ b/LedgerSMB.pm @@ -103,10 +103,9 @@ sub escape { my $regex = qr/([^a-zA-Z0-9_.-])/; $str =~ s/$regex/sprintf("%%%02x", ord($1))/ge; - # for Apache 2 we escape strings twice - if (($ENV{SERVER_SIGNATURE} =~ /Apache\/2\.(\d+)\.(\d+)/)) { - $str =~ s/$regex/sprintf("%%%02x", ord($1))/ge - if $1 == 0 && $2 < 44; + # for Apache 2.0.x prior to 2.0.44 we escape strings twic; + if ($ENV{SERVER_SIGNATURE} =~ /Apache\/2\.0\.(\d+)/ && $1 < 44) { + $str =~ s/$regex/sprintf("%%%02x", ord($1))/ge; } $str; } -- cgit v1.2.3