forward port Thingy newline display fix (Form/Textarea)
This commit is contained in:
parent
f0c0c4042d
commit
d3f8a075a7
3 changed files with 13 additions and 2 deletions
|
|
@ -10,8 +10,8 @@
|
|||
- fixed: Adding a file extension for URLs in the system settings now properly affects newly created Assets. It still does not update existing asset URL's.
|
||||
- fixed #9152: Pagination broken in Contribs Section of new Account System
|
||||
- fixed #4159: more menu doesn't appear for current asset on crumb trail
|
||||
- fixed: Adding a file extension for URLs in the system settings now properly affects newly created Assets. It still does not update existing asset URL's.
|
||||
- fixed #9157: another typ-o in i18n
|
||||
- fixed #9112: Thingy View Thing screen doesn't preserve newlines
|
||||
|
||||
7.6.4
|
||||
- Survey now will show progress and time limit.
|
||||
|
|
@ -79,6 +79,7 @@
|
|||
- fixed #9140: Date format error when adding tasks to PM
|
||||
- fixed #8800: Errors in POD of Asset-related mix-in modules (Bernd Kalbfuß-Zimmermann)
|
||||
- fixed #9143: Yes No user profile fields problem when default == 1
|
||||
- fixed #9155: purpose of "headblock" duplicates "extra head tags"
|
||||
|
||||
7.5.34
|
||||
- fixed: Regression with ProfileField->formField. Added tests to prevent future regression
|
||||
|
|
|
|||
|
|
@ -194,6 +194,7 @@ sub getValueAsHtml {
|
|||
my $self = shift;
|
||||
my $value = $self->SUPER::getValueAsHtml(@_);
|
||||
$value = WebGUI::HTML::filter($value, 'text');
|
||||
$value =~ s/\n/<br>/sg;
|
||||
return $value;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ my $testBlock = [
|
|||
|
||||
my $formType = 'textarea';
|
||||
|
||||
my $numTests = 7 + scalar @{ $testBlock } + 5;
|
||||
my $numTests = 7 + scalar @{ $testBlock } + 6;
|
||||
|
||||
|
||||
plan tests => $numTests;
|
||||
|
|
@ -104,6 +104,15 @@ is($txt->getValue("some \ntest \r\nhere"), "some \ntest \r\nhere", 'getValue(new
|
|||
is($session->form->textarea(undef,"some test here"), "some test here", 'session->form->textarea(undef,text)');
|
||||
is($session->form->textarea(undef,"some \ntest \r\nhere"), "some \ntest \r\nhere", 'session->form->textarea(undef,newlines)');
|
||||
|
||||
###################################################################
|
||||
#
|
||||
# getValueAsHtml
|
||||
#
|
||||
###################################################################
|
||||
|
||||
$txt = WebGUI::Form::Textarea->new($session, { value => "line1\nline2\nline3", });
|
||||
is($txt->getValueAsHtml, 'line1<br>line2<br>line3', 'getValueAsHtml translates newlines into break tags');
|
||||
|
||||
|
||||
__END__
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue