summaryrefslogtreecommitdiff
path: root/lib/VNDB
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-01-27 11:24:43 +0100
committerYorhel <git@yorhel.nl>2011-01-27 11:24:43 +0100
commit1216d74abfa0a40ab6abcef338f2fb891cd0fba6 (patch)
tree20757b91d3dab1fc87be6c6de958f96a2f6f3f0a /lib/VNDB
parent2b1d425af0d2b27e383a0a4a18ec5d7c9b9b25ba (diff)
TUWF: No need for manual XML-escaping in textareas anymore
TUWF::XML does not automatically convert '\n' to '<br />' anymore, so it's now safe to pass the contents of the textarea to its HTML function.
Diffstat (limited to 'lib/VNDB')
-rw-r--r--lib/VNDB/Util/FormHTML.pm14
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/VNDB/Util/FormHTML.pm b/lib/VNDB/Util/FormHTML.pm
index 57ec5b58..2bb2913d 100644
--- a/lib/VNDB/Util/FormHTML.pm
+++ b/lib/VNDB/Util/FormHTML.pm
@@ -152,12 +152,7 @@ sub htmlFormPart {
input type => 'hidden', id => $o{short}, name => $o{short}, value => $frm->{$o{short}}||'', class => 'dateinput';
}
if(/text/) {
- (my $txt = $frm->{$o{short}}||'') =~ s/&/&amp;/;
- $txt =~ s/</&lt;/;
- $txt =~ s/>/&gt;/;
- textarea name => $o{short}, id => $o{short}, rows => $o{rows}||5, cols => $o{cols}||60;
- lit $txt;
- end;
+ textarea name => $o{short}, id => $o{short}, rows => $o{rows}||5, cols => $o{cols}||60, $frm->{$o{short}}||'';
}
end;
end;
@@ -232,16 +227,11 @@ sub htmlForm {
}
# edit summary
- (my $txt = $options->{frm}{editsum}||'') =~ s/&/&amp;/;
- $txt =~ s/</&lt;/;
- $txt =~ s/>/&gt;/;
h2;
txt mt '_form_editsum';
b class => 'standout', ' ('.mt('_inenglish').')';
end;
- textarea name => 'editsum', id => 'editsum', rows => 4, cols => 50;
- lit $txt;
- end;
+ textarea name => 'editsum', id => 'editsum', rows => 4, cols => 50, $options->{frm}{editsum}||'';
br;
}
input type => 'submit', value => mt('_form_submit'), class => 'submit';