Ticket #646: 646-jForms-jTpl-html-plugins-textarea-should-render-linebreaks-1.0.x-branch.diff
| File 646-jForms-jTpl-html-plugins-textarea-should-render-linebreaks-1.0.x-branch.diff, 2.0 kB (added by Julien, 6 months ago) |
|---|
-
lib/jelix/plugins/tpl/html/function.ctrl_value.php
old new 3 3 * @package jelix 4 4 * @subpackage jtpl_plugin 5 5 * @author Laurent Jouanneau 6 * @contributor Dominique Papin 6 * @contributor Dominique Papin, Julien Issler 7 7 * @copyright 2007 Laurent Jouanneau, 2007 Dominique Papin 8 * @copyright 2008 Julien Issler 8 9 * @link http://www.jelix.org 9 10 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 10 11 */ … … 51 52 $s.=$sep.htmlspecialchars($v); 52 53 } 53 54 echo substr($s, strlen($sep)); 54 }else 55 }else if($ctrl->type == 'textarea') 56 echo nl2br(htmlspecialchars($value)); 57 else 55 58 echo htmlspecialchars($value); 56 59 } 57 60 -
lib/jelix/plugins/tpl/html/function.formdatasfull.php
old new 3 3 * @package jelix 4 4 * @subpackage jtpl_plugin 5 5 * @author Laurent Jouanneau 6 * @contributor Dominique Papin 6 * @contributor Dominique Papin, Julien Issler 7 7 * @copyright 2007 Laurent Jouanneau, 2007 Dominique Papin 8 * @copyright 2008 Julien Issler 8 9 * @link http://www.jelix.org 9 10 * @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html 10 11 */ … … 36 37 $s.=','.htmlspecialchars($v); 37 38 } 38 39 echo substr($s, 1); 39 }else 40 }else if($ctrl->type == 'textarea') 41 echo nl2br(htmlspecialchars($value)); 42 else 40 43 echo htmlspecialchars($value); 41 44 42 45 echo '</td></tr>';
