Skip to content

Commit

Permalink
[#1284] add support for noescape option in FormHTML plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
kareila committed Mar 7, 2015
1 parent c1b5074 commit d96baf7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cgi-bin/DW/Template/Plugin/FormHTML.pm
Expand Up @@ -409,9 +409,13 @@ sub _process_value_and_label {
my $label_html = "";
my $label = delete $args->{label};
my $labelclass = delete $args->{labelclass} || "";
my $noescape = delete $args->{noescape};

$label_html = LJ::labelfy( $args->{id}, LJ::ehtml( $label ), $labelclass )
if defined $label;
if ( defined $label ) {
# don't ehtml the label text if noescape is specified
$label = LJ::ehtml( $label ) unless $noescape;
$label_html = LJ::labelfy( $args->{id}, $label, $labelclass );
}

return $label_html || "";
}
Expand Down

0 comments on commit d96baf7

Please sign in to comment.