Skip to content

Commit

Permalink
Item13302: CGI>=4.11 breaks utf8 encoded strings
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Mar 24, 2015
1 parent 860bedc commit 2dceb3f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
8 changes: 7 additions & 1 deletion lib/Foswiki/Form/Autofill.pm
Expand Up @@ -41,11 +41,17 @@ sub renderForEdit {
# even though it's not accessible for standard edits. Some contribs
# may want to override this to make labels editable.
my $renderedValue = $topicObject->expandMacros($value);

if ($this->can("decode")) {
$value = $this->decode($value);
}

return (
'',
CGI::hidden(
-name => $this->{name},
-value => $value
-override => 1,
-value => $value,
)
. CGI::div({-class => $this->{_formfieldClass},}, $renderedValue)
);
Expand Down
3 changes: 2 additions & 1 deletion lib/Foswiki/Form/Id.pm
Expand Up @@ -44,7 +44,8 @@ sub renderForEdit {
'',
CGI::hidden(
-name => $this->{name},
-value => $value
-override => 1,
-value => $value,
)
. CGI::div({-class => $this->{_formfieldClass},}, $renderedValue)
);
Expand Down
3 changes: 2 additions & 1 deletion lib/Foswiki/Form/NetworkAddressField.pm
Expand Up @@ -81,7 +81,8 @@ sub renderForEdit {
-class => $this->cssClasses('foswikiInputField', $this->{_class}, $required),
-name => $this->{name},
-size => $this->{size},
-value => $value
-override => 1,
-value => $value,
)
);
}
Expand Down
3 changes: 2 additions & 1 deletion lib/Foswiki/Form/Phonenumber.pm
Expand Up @@ -54,7 +54,8 @@ sub renderForEdit {
-class => $this->cssClasses('foswikiInputField foswikiPhoneNumber'),
-name => $this->{name},
-size => $this->{size},
-value => $value
-override => 1,
-value => $value,
)
);
}
Expand Down
5 changes: 3 additions & 2 deletions lib/Foswiki/Form/Topic.pm
Expand Up @@ -72,7 +72,7 @@ sub populateMetaFromQueryData {
my ($this, $query, $meta, $old) = @_;

if ($this->isMultiValued()) {
my @values = $query->param($this->{name});
my @values = $query->multi_param($this->{name});

if (scalar(@values) == 1 && defined $values[0]) {
@values = split(/,|%2C/, $values[0]);
Expand All @@ -95,7 +95,8 @@ sub populateMetaFromQueryData {
}

sub getOptions {
return [];
my $this = shift;
return $this->{_options};
}

sub getDisplayValue {
Expand Down

0 comments on commit 2dceb3f

Please sign in to comment.