Author: richter
Date: Thu Jan 15 08:38:40 2015
New Revision: 1651970

URL: http://svn.apache.org/r1651970
Log:
Convert linefeeds to <br> in info control

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

Modified: perl/embperl/trunk/Embperl/Form/Control/info.pm
URL: 
http://svn.apache.org/viewvc/perl/embperl/trunk/Embperl/Form/Control/info.pm?rev=1651970&r1=1651969&r2=1651970&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Control/info.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Control/info.pm Thu Jan 15 08:38:40 2015
@@ -36,9 +36,12 @@ __EMBPERL__
 my $span = ($self->{width_percent});
 my $state   = $self -> {state} ;
 $state =~ s/[^-a-zA-Z0-9_]/_/g ;
+my $srctext = $self -> {showtext}?($self->{text}):$self -> form -> 
convert_text ($self, undef, undef, $req) ;
+my $text = join ('<br>', map {$epreq -> Escape ($_, 5)} split /\n/, $srctext) ;
+
 $]<table class="ef-element ef-element-width-[+ $self -> {width_percent} +][+ ' 
'+][+ $state +]">
   <tr>
-<td [+ do { local $escmode = 0 ; $self -> get_std_control_attr($req, undef, 
'readonly', 'ef-control-info') } +] >[$ if $self -> {image} $]<img 
class="cControlButtonSymbol" src="[+ $self -> {image} +]">[$endif$][+ $self -> 
{showtext}?($self->{text}):$self -> form -> convert_text ($self, undef, undef, 
$req) +]&nbsp;</td>
+<td [+ do { local $escmode = 0 ; $self -> get_std_control_attr($req, undef, 
'readonly', 'ef-control-info') } +] >[$ if $self -> {image} $]<img 
class="cControlButtonSymbol" src="[+ $self -> {image} +]">[$endif$][+ do { 
local $escmode = 0 ; $text } +]&nbsp;</td>
 </tr>
   </table>[$endsub$]
 



---------------------------------------------------------------------
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