HTML_QuickForm - Bugfix for textarea

From: Date: Fri, 29 Nov 2002 12:38:34 +0000
Subject: HTML_QuickForm - Bugfix for textarea
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-11250@lists.php.net to get a copy of this message
I use HTML_QuickForm and have the problem, that values in <textarea> currently not would escaped by htmlentities(). Package-Versions: HTML_Common 1.0 (also try the actual HTML_Common/Common.php from cvs.php.net) HTML_QuickForm 2.5 This Bugfix works for me: cvs -q diff -u textarea.php Index: textarea.php =================================================================== RCS file: /repository/pear/HTML_QuickForm/QuickForm/textarea.php,v retrieving revision 1.4 diff -u -r1.4 textarea.php --- textarea.php 7 Aug 2002 08:43:05 -0000 1.4 +++ textarea.php 29 Nov 2002 12:27:05 -0000 @@ -200,7 +200,7 @@ $tabs = $this->_getTabs(); $html = "$tabs<textarea".$this->_getAttrString($this-> _attributes).">"; // because we wrap the form later we don't want the text indented - $html .= preg_replace("/(\r\n|\n|\r)/", '&#010;', $this-> _value); + $html .= preg_replace("/(\r\n|\n|\r)/", '&#010;', htmlentities($this->_value)); $html .= "</textarea>"; } return $html; HTH. -- http://4bconsult.de

« previous php.pear.dev (#11250) next »