Changeset 1016

Show
Ignore:
Timestamp:
07/12/08 00:01:22 (5 months ago)
Author:
bastnic
Message:

#646, linebreaks in textareas in jtpl plugin, p= Julien Issler

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/jelix/CREDITS

    r1015 r1016  
    2727 - some errors and missing help for jAcl2 command line scripts (#622) 
    2828 - jSession: old sessions are not purged with some PHP configurations (#645) 
     29 - linebreaks in textareas in jtpl plugin (#646) 
    2930 
    3031Bastien Jaillot (aka bastnic) 
  • trunk/lib/jelix/plugins/tpl/html/function.ctrl_value.php

    r877 r1016  
    44* @subpackage   jtpl_plugin 
    55* @author       Laurent Jouanneau 
    6 * @contributor  Dominique Papin 
     6* @contributor  Dominique Papin, Julien Issler 
    77* @copyright    2007-2008 Laurent Jouanneau, 2007 Dominique Papin 
     8* @copyright    2008 Julien Issler 
    89* @link         http://www.jelix.org 
    910* @licence      GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    5455        } 
    5556        echo substr($s, strlen($sep)); 
    56     }elseif($ctrl->datatype instanceof jDatatypeHtml) { 
     57    }elseif($ctrl->datatype instanceof jDatatypeHtml) 
    5758        echo $value; 
    58     }else 
     59    else if($ctrl->type == 'textarea') 
     60        echo nl2br(htmlspecialchars($value)); 
     61    else 
    5962        echo htmlspecialchars($value); 
    6063} 
  • trunk/lib/jelix/plugins/tpl/html/function.formdatafull.php

    r883 r1016  
    44* @subpackage   jtpl_plugin 
    55* @author       Laurent Jouanneau 
    6 * @contributor  Dominique Papin 
     6* @contributor  Dominique Papin, Julien Issler 
    77* @copyright    2007-2008 Laurent Jouanneau, 2007 Dominique Papin 
     8* @copyright    2008 Julien Issler 
    89* @link         http://www.jelix.org 
    910* @licence      GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 
     
    3435            } 
    3536            echo substr($s, 1); 
    36         }elseif($ctrl->datatype instanceof jDatatypeHtml) { 
     37        }elseif($ctrl->datatype instanceof jDatatypeHtml) 
    3738            echo $value; 
    38         }else 
     39        else if($ctrl->type == 'textarea') 
     40            echo nl2br(htmlspecialchars($value)); 
     41        else 
    3942            echo htmlspecialchars($value); 
    4043 
Download in other formats: Unified Diff Zip Archive