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.

Conflicts:
	TablePlugin/lib/Foswiki/Plugins/TablePlugin/Core.pm
  • Loading branch information
gac410 committed Dec 30, 2015
1 parent cb452f8 commit 1298518
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 4 additions & 5 deletions TablePlugin/lib/Foswiki/Plugins/TablePlugin/Core.pm
Expand Up @@ -1897,11 +1897,10 @@ sub handler {
@origTable = $cgi->multi_param('table');
@origUp = $cgi->multi_param('up'); # NOTE: internal parameter
$cgi->delete( 'sortcol', 'table', 'up' );
$url = NFC(
Foswiki::decode_utf8(
$cgi->url( -absolute => 1, -path => 1 ) . '?'
)
);
$url =
NFC(
Foswiki::urlDecode( $cgi->url( -absolute => 1, -path => 1 ) . '?' )
);
my $queryString = $cgi->query_string();

if ($queryString) {
Expand Down
3 changes: 3 additions & 0 deletions core/lib/Foswiki/Request.pm
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 1298518

Please sign in to comment.