Skip to content

Commit

Permalink
Item13881: Fix unicode column headings
Browse files Browse the repository at this point in the history
The Request->url() method returns the path and query string components
as url encoded byte strings.   Need to call Foswiki::decodeUrl to
recover the character string.
  • Loading branch information
gac410 committed Dec 30, 2015
1 parent 0059ff1 commit dcee054
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion TablePlugin/lib/Foswiki/Plugins/TablePlugin/Core.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1893,8 +1893,10 @@ sub handler {
@origTable = $cgi->multi_param('table');
@origUp = $cgi->multi_param('up'); # NOTE: internal parameter
$cgi->delete( 'sortcol', 'table', 'up' );
$url = $cgi->url( -absolute => 1, -path => 1 ) . '?';
$url =
Foswiki::urlDecode( $cgi->url( -absolute => 1, -path => 1 ) . '?' );
my $queryString = $cgi->query_string();

if ($queryString) {
$url .= $queryString . ';';
}
Expand Down
3 changes: 3 additions & 0 deletions core/lib/Foswiki/Request.pm
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ Returns many url info.
* -path => 1, -query => 1 also includes path info and query string
respectively
Note that the path and query components are returned as a *URL encoded byte string*
You will most likely need to Foswiki::urlDecode it for use.
Reasonably compatible with CGI corresponding method. Doesn't support
-rewrite. See Item5914.
Expand Down

0 comments on commit dcee054

Please sign in to comment.