Author: richter
Date: Sun May 10 16:13:53 2015
New Revision: 1678575

URL: http://svn.apache.org/r1678575
Log:
textarea HTML, no <br>

Modified:
    perl/embperl/trunk/Embperl/Form/Control/textarea.pm

Modified: perl/embperl/trunk/Embperl/Form/Control/textarea.pm
URL: 
http://svn.apache.org/viewvc/perl/embperl/trunk/Embperl/Form/Control/textarea.pm?rev=1678575&r1=1678574&r2=1678575&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Control/textarea.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Control/textarea.pm Sun May 10 16:13:53 2015
@@ -184,13 +184,14 @@ $]
 my $text  = $self -> get_display_text ($req, $value)  ;
 $text =~ s/\s*$// ;
 $text =~ s/^\s*// ;
-my @text = split (/\n/, $text) ;
 my $name  = $self -> {force_name} || $self -> {name} ;
+my $is_html =  $self -> {format} eq 'html' ;
+my @text = $is_html?($text):split (/\n/, $text) ;
 $]
 <div [+ do { local $escmode = 0 ; $self -> get_std_control_attr($req, '', 
'readonly') } +] _ef_divname="[+ $name +]">
 [$ foreach my $val (@text) $]
 [$ if $val =~ /^\s*$/ $]<br>[$else$]
-[+ $val +]
+[$if $is_html $][+ do { local $escmode = 0 ; $val } +][$else$][+ $val 
+][$endif$]
 [$endif$] 
 [$endforeach$]
 </div>



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-cvs-unsubscr...@perl.apache.org
For additional commands, e-mail: embperl-cvs-h...@perl.apache.org

Reply via email to