Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Follow-up fix for bug#10361: Incorrect handling of special characters…
Browse files Browse the repository at this point in the history
… in DynamicFields.
  • Loading branch information
mgruner committed Mar 21, 2014
1 parent 5796222 commit c45500f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Kernel/System/DynamicField/Backend/Checkbox.pm
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,12 @@ Ignore this field.
EOF
}

my $FieldLabelEscaped = $Param{LayoutObject}->Ascii2Html(
Text => $FieldLabel,
);

$HTMLString .= <<"EOF";
<input type="checkbox" class="$FieldClass" id="$FieldName" name="$FieldName" title="$FieldLabel" $FieldChecked value="1" />
<input type="checkbox" class="$FieldClass" id="$FieldName" name="$FieldName" title="$FieldLabelEscaped" $FieldChecked value="1" />
EOF

if ( $Param{Mandatory} ) {
Expand Down
10 changes: 9 additions & 1 deletion Kernel/System/DynamicField/Backend/Text.pm
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,16 @@ sub SearchFieldRender {
# check and set class if necessary
my $FieldClass = 'DynamicFieldText';

my $FieldLabelEscaped = $Param{LayoutObject}->Ascii2Html(
Text => $FieldLabel,
);

my $ValueEscaped = $Param{LayoutObject}->Ascii2Html(
Text => $Value,
);

my $HTMLString = <<"EOF";
<input type="text" class="$FieldClass" id="$FieldName" name="$FieldName" title="$FieldLabel" value="$Value" />
<input type="text" class="$FieldClass" id="$FieldName" name="$FieldName" title="$FieldLabelEscaped" value="$ValueEscaped" />
EOF

my $AdditionalText;
Expand Down
10 changes: 9 additions & 1 deletion Kernel/System/DynamicField/Backend/TextArea.pm
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,16 @@ sub SearchFieldRender {
# check and set class if necessary
my $FieldClass = 'DynamicFieldText';

my $FieldLabelEscaped = $Param{LayoutObject}->Ascii2Html(
Text => $FieldLabel,
);

my $ValueEscaped = $Param{LayoutObject}->Ascii2Html(
Text => $Value,
);

my $HTMLString = <<"EOF";
<input type="text" class="$FieldClass" id="$FieldName" name="$FieldName" title="$FieldLabel" value="$Value" />
<input type="text" class="$FieldClass" id="$FieldName" name="$FieldName" title="$FieldLabelEscaped" value="$ValueEscaped" />
EOF

# call EditLabelRender on the common backend
Expand Down

0 comments on commit c45500f

Please sign in to comment.