diff -ru twiki20040507beta/lib/TWiki/Render.pm twiki/lib/TWiki/Render.pm --- twiki20040507beta/lib/TWiki/Render.pm 2004-05-01 08:53:36.000000000 +0200 +++ twiki/lib/TWiki/Render.pm 2004-05-23 14:21:51.069735408 +0200 @@ -582,8 +582,10 @@ # Turn spaced-out names into WikiWords - upper case first letter of # whole link, and first of each word. TODO: Try to turn this off, # avoiding spaces being stripped elsewhere - e.g. $doPreserveSpacedOutWords - $theTopic =~ s/^(.)/\U$1/; - $theTopic =~ s/\s($regex{singleMixedAlphaNumRegex})/\U$1/go; + # Disabled to make TWiki "space-clean". Was inconsistent with other ways of + # topic creation. Everything seem to work. + #$theTopic =~ s/^(.)/\U$1/; + #$theTopic =~ s/\s($regex{singleMixedAlphaNumRegex})/\U$1/go; # Add before WikiWord inside link text to prevent double links $theLinkText =~ s/([\s\(])($regex{singleUpperAlphaRegex})/$1$2/go; diff -ru twiki20040507beta/lib/TWiki/Search.pm twiki/lib/TWiki/Search.pm --- twiki20040507beta/lib/TWiki/Search.pm 2004-04-26 03:26:22.000000000 +0200 +++ twiki/lib/TWiki/Search.pm 2004-05-23 14:07:04.562504992 +0200 @@ -214,7 +214,7 @@ my @take = @topicList; my @set = splice( @take, 0, $maxTopicsInSet ); while( @set ) { - @set = map { "$_.txt" } @set; # add ".txt" extension to topic names + @set = map { "$TWiki::cmdQuote$_.txt$TWiki::cmdQuote" } @set; # add ".txt" extension to topic names my $acmd = $cmd; $acmd =~ s/%TOKEN%/$token/o; $acmd =~ s/%FILES%/@set/o; diff -ru twiki20040507beta/lib/TWiki/Store/RcsWrap.pm twiki/lib/TWiki/Store/RcsWrap.pm --- twiki20040507beta/lib/TWiki/Store/RcsWrap.pm 2004-04-21 17:53:22.000000000 +0200 +++ twiki/lib/TWiki/Store/RcsWrap.pm 2004-05-23 14:14:05.832462224 +0200 @@ -103,6 +103,9 @@ $self->{tagCmd} = $settings{tagCmd}; } +#TODO set from TWiki.cfg +my $cmdQuote = "'"; + # ====================== =pod @@ -156,7 +159,7 @@ # Can only do something when changing to binary my $cmd = $self->{"initBinaryCmd"}; my $file = $self->file(); - $cmd =~ s/%FILENAME%/$file/go; + $cmd =~ s/%FILENAME%/$cmdQuote$file$cmdQuote/go; $cmd =~ /(.*)/; $cmd = "$1"; # safe, so untaint variable my $rcsOutput = `$cmd`; @@ -229,7 +232,7 @@ $cmd =~ s/%USERNAME%/$user/; $file =~ s/$TWiki::securityFilter//go; $rcsFile =~ s/$TWiki::securityFilter//go; - $cmd =~ s/%FILENAME%/$file $rcsFile/; + $cmd =~ s/%FILENAME%/$cmdQuote$file$cmdQuote $cmdQuote$rcsFile$cmdQuote/; $cmd =~ /(.*)/; $cmd = $1; # safe, so untaint variable $rcsOut = `$cmd`; @@ -278,7 +281,7 @@ my $file = $self->{file}; my $rcsFile = $self->{rcsFile}; my $cmd= $self->{unlockCmd}; - $cmd =~ s/%FILENAME%/$file $rcsFile/go; + $cmd =~ s/%FILENAME%/$cmdQuote$file$cmdQuote $cmdQuote$rcsFile$cmdQuote/go; $cmd =~ /(.*)/; $cmd = $1; # safe, so untaint my $rcsOut = `$cmd`; # capture stderr @@ -291,7 +294,7 @@ } $cmd= $self->{delRevCmd}; $cmd =~ s/%REVISION%/1.$rev/go; - $cmd =~ s/%FILENAME%/$file $rcsFile/go; + $cmd =~ s/%FILENAME%/$cmdQuote$file$cmdQuote $cmdQuote$rcsFile$cmdQuote/go; $cmd =~ /(.*)/; $cmd = $1; # safe, so untaint variable $rcsOut = `$cmd`; @@ -304,7 +307,7 @@ } $cmd= $self->{lockCmd}; $cmd =~ s/%REVISION%/$rev/go; - $cmd =~ s/%FILENAME%/$file $rcsFile/go; + $cmd =~ s/%FILENAME%/$cmdQuote$file$cmdQuote $cmdQuote$rcsFile$cmdQuote/go; $cmd =~ /(.*)/; $cmd = $1; # safe, so untaint variable $rcsOut = `$cmd`; @@ -341,7 +344,7 @@ $tmpRevFile = "$tmpfile,v"; copy( $self->rcsFile(), $tmpRevFile ); my $cmd1 = $self->{tmpBinaryCmd}; - $cmd1 =~ s/%FILENAME%/$tmpRevFile/; + $cmd1 =~ s/%FILENAME%/$cmdQuote$tmpRevFile$cmdQuote/; $cmd1 =~ /(.*)/; $cmd1 = "$1"; my $tmp = `$cmd1`; @@ -350,7 +353,7 @@ $cmd =~ s/-p%REVISION%/-r%REVISION%/; } $cmd =~ s/%REVISION%/1.$version/; - $cmd =~ s/%FILENAME%/$file/; + $cmd =~ s/%FILENAME%/$cmdQuote$file$cmdQuote/; $cmd =~ /(.*)/; $cmd = "$1"; # untaint my $text = `$cmd`; @@ -385,7 +388,7 @@ return ""; } - $cmd =~ s/%FILENAME%/$rcsFile/; + $cmd =~ s/%FILENAME%/$cmdQuote$rcsFile$cmdQuote/; $cmd =~ /(.*)/; $cmd = $1; # now safe, so untaint variable my $rcsOutput = `$cmd`; @@ -431,7 +434,7 @@ if ( -e $rcsFile ) { my $cmd= $self->{infoCmd}; $cmd =~ s/%REVISION%/$version/; - $cmd =~ s/%FILENAME%/$rcsFile/; + $cmd =~ s/%FILENAME%/$cmdQuote$rcsFile$cmdQuote/; $cmd =~ /(.*)/; $cmd = $1; # Untaint my $rcsOut = `$cmd`; my $exit = $? >> 8; @@ -486,7 +489,7 @@ $tmp =~ s/%REVISION2%/1.$rev2/; my $rcsFile = $self->rcsFile(); $rcsFile =~ s/$TWiki::securityFilter//go; - $tmp =~ s/%FILENAME%/$rcsFile/; + $tmp =~ s/%FILENAME%/$cmdQuote$rcsFile$cmdQuote/; $tmp =~ s/%CONTEXT%/$contextLines/; $tmp =~ /(.*)/; my $cmd = $1; # now safe, so untaint variable @@ -599,7 +602,7 @@ my $rcsOutput = ""; $cmd =~ s/%USERNAME%/$userName/; $file =~ s/$TWiki::securityFilter//go; - $cmd =~ s/%FILENAME%/$file/; + $cmd =~ s/%FILENAME%/$cmdQuote$file$cmdQuote/; $comment = "none" unless( $comment ); $comment =~ s/[\"\'\`\;]//go; # security, Codev.NoShellCharacterEscapingInFileAttachComment, MikeSmith $cmd =~ s/%COMMENT%/$comment/; @@ -611,7 +614,7 @@ if( $exit && $rcsOutput =~ /no lock set by/ ) { # Try and break lock, setting new one and doing ci again my $cmd = $self->{"breakLockCmd"}; - $cmd =~ s/%FILENAME%/$file/go; + $cmd =~ s/%FILENAME%/$cmdQuote$file$cmdQuote/go; $cmd =~ /(.*)/; my $out = `$cmd`; _traceExec( $cmd, $out ); @@ -653,7 +656,7 @@ if ( -e $file ) { my $cmd= $self->{tagCmd}; $cmd =~ s/%REVISION%/$rev/; - $cmd =~ s/%FILENAME%/$file/; + $cmd =~ s/%FILENAME%/$cmdQuote$file$cmdQuote/; $cmd =~ s/%TAG%/$tag/; $cmd = $cmd." 2>> $TWiki::warningFilename"; $cmd =~ /(.*)/; $cmd = $1; # Untaint diff -ru twiki20040507beta/lib/TWiki.pm twiki/lib/TWiki.pm --- twiki20040507beta/lib/TWiki.pm 2004-05-07 17:02:22.000000000 +0200 +++ twiki/lib/TWiki.pm 2004-05-23 12:17:15.181243208 +0200 @@ -1538,6 +1538,7 @@ # PTh 20 Jun 2000: renamed sub viewUrl to getViewUrl, added $theWeb # WM 14 Feb 2004: Removed support for old syntax not specifying $theWeb + $theTopic =~ s/ /%20/gs; # Whitespace must be allowed. $theTopic =~ s/\s*//gs; # Illegal URL, remove space # PTh 24 May 2000: added $urlHost, needed for some environments