Skip to content

Commit

Permalink
Item10411: reverted previous change, but left the unit test.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/branches/Release01x01@10805 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
CrawfordCurrie authored and CrawfordCurrie committed Feb 25, 2011
1 parent 83725e6 commit 57dc255
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions UnitTestContrib/test/unit/FuncTests.pm
Expand Up @@ -293,8 +293,8 @@ sub test_getScriptUrl {
$this->assert_matches( qr!/$ss/$this->{users_web}/AndMash!, $result );

$result = Foswiki::Func::getScriptUrl( $this->{users_web}, "WebHome", 'wibble',
wobble => 'wimple', '#' => 'wazzock');
$this->assert_matches( qr!/$ss/$this->{users_web}/WebHome#wazzock\?wobble=wimple$!, $result );
'#' => 'wazzock', wobble => 'wimple');
$this->assert_matches( qr!/$ss/$this->{users_web}/WebHome\?wobble=wimple#wazzock$!, $result );

$result = Foswiki::Func::getScriptUrl( $this->{users_web}, "WebHome", 'wibble',
wobble => 1, wimple => 2);
Expand Down
5 changes: 3 additions & 2 deletions core/lib/Foswiki.pm
Expand Up @@ -1424,9 +1424,10 @@ sub _make_params {
my $notfirst = shift;
my $url = '';
my $ps = '';
my $anchor = '';
while ( my $p = shift @_ ) {
if ( $p eq '#' ) {
$url .= '#' . urlEncode( shift(@_) );
$anchor = '#' . urlEncode( shift(@_) );
}
else {
my $v = shift(@_);
Expand All @@ -1438,7 +1439,7 @@ sub _make_params {
$ps =~ s/^;/?/ unless $notfirst;
$url .= $ps;
}
return $url;
return $url . $anchor;
}

=begin TML
Expand Down

0 comments on commit 57dc255

Please sign in to comment.