Changeset 1047

Show
Ignore:
Timestamp:
07/25/08 12:19:32 (4 months ago)
Author:
julieni
Message:

ticket #646: linebreaks in textareas in jtpl plugin

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0.x/lib/jelix/CREDITS

    r1039 r1047  
    7878 - jForms: fixed bugs in jforms.js based on Martus' report (#554) 
    7979 - jSession: old sessions are not purged with some PHP configurations (#645) 
     80 - linebreaks in textareas in jtpl plugin (#646) 
    8081 
    8182Bastien Jaillot (aka bastnic) 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/function.ctrl_value.php

    r702 r1047  
    44* @subpackage   jtpl_plugin 
    55* @author       Laurent Jouanneau 
    6 * @contributor  Dominique Papin 
     6* @contributor  Dominique Papin, Julien Issler 
    77* @copyright    2007 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 
     
    5253        } 
    5354        echo substr($s, strlen($sep)); 
    54     }else 
     55    }else if($ctrl->type == 'textarea') 
     56        echo nl2br(htmlspecialchars($value)); 
     57    else 
    5558        echo htmlspecialchars($value); 
    5659} 
  • branches/1.0.x/lib/jelix/plugins/tpl/html/function.formdatasfull.php

    r968 r1047  
    44* @subpackage   jtpl_plugin 
    55* @author       Laurent Jouanneau 
    6 * @contributor  Dominique Papin 
     6* @contributor  Dominique Papin, Julien Issler 
    77* @copyright    2007 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 
     
    3738            } 
    3839            echo substr($s, 1); 
    39         }else 
     40        }else if($ctrl->type == 'textarea') 
     41            echo nl2br(htmlspecialchars($value)); 
     42        else 
    4043            echo htmlspecialchars($value); 
    4144 
Download in other formats: Unified Diff Zip Archive