Skip to content

Commit

Permalink
Item2297: Typo in MANIFEST
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@6563 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Feb 27, 2010
1 parent da0d5d3 commit 446b8c6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 4 additions & 1 deletion core/lib/Foswiki/Form/FieldDefinition.pm
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,10 @@ sub renderForDisplay {
}

require Foswiki::Render;
$value = Foswiki::Render::protectFormFieldValue( $value, $attrs );
# Item5489: Leave it up to the caller of renderForDisplay to protect the
# formfield value. Always calling protect makes renderForDisplay() useless
# except for formatted searches.
# $value = Foswiki::Render::protectFormFieldValue( $value, $attrs );

$format =~ s/\$title/$this->{title}/g;
$format =~ s/\$value/$value/g;
Expand Down
9 changes: 6 additions & 3 deletions core/lib/Foswiki/Meta.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ is rendered.
=cut

sub renderFormFieldForDisplay {
my ( $this, $name, $format, $attrs ) = @_;
my ( $this, $name, $format ) = @_;

my $value;
my $mf = $this->get( 'FIELD', $name );
Expand All @@ -1306,7 +1306,7 @@ sub renderFormFieldForDisplay {
if ($form) {
my $field = $form->getField($name);
if ($field) {
return $field->renderForDisplay( $format, $value, $attrs );
return $field->renderForDisplay( $format, $value );
}
}
}
Expand All @@ -1316,7 +1316,10 @@ sub renderFormFieldForDisplay {
if ($f) {
$format =~ s/\$title/$f->{title}/;
require Foswiki::Render;
$value = Foswiki::Render::protectFormFieldValue( $value, $attrs );
# Item5489: Leave it up to the caller of renderForDisplay to protect the
# formfield value. Always calling protect makes renderForDisplay() useless
# except for formatted searches.
# $value = Foswiki::Render::protectFormFieldValue( $value );
$format =~ s/\$value/$value/;
}
return $format;
Expand Down
2 changes: 1 addition & 1 deletion core/lib/MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
!include ../HistoryPlugin/lib/Foswiki/Plugins/HistoryPlugin
!include ../InterwikiPlugin/lib/Foswiki/Plugins/InterwikiPlugin
!include ../JSCalendarContrib/lib/Foswiki/Contrib/JSCalendarContrib
!include ../JQueryPlugin/lib/Foswiki/Contrib/JQueryPlugin
!include ../JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin
!include ../MailerContrib/lib/Foswiki/Contrib/MailerContrib
!include ../PatternSkin/lib/Foswiki/Contrib/PatternSkin
!include ../PreferencesPlugin/lib/Foswiki/Plugins/PreferencesPlugin
Expand Down

0 comments on commit 446b8c6

Please sign in to comment.