Re: HTML_QuickForm annoyance

From: Date: Fri, 06 Sep 2002 10:10:46 +0000
Subject: Re: HTML_QuickForm annoyance
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2255@lists.php.net to get a copy of this message
On Fri September 6 2002 12:51 am, Tim Glen wrote: > HI all, > > I have a couple of small annoyances with HTML_QuickForm. They're not > technically bugs, but they can create some problems that look like bugs in > software based on HTML_QuickForm. Funnily enough, they both affect > textareas and not really anything else. Without further ado, here they are > with descriptions of what can happen. > > Line 973 of QuickForm.php in function _wrapForm: > $html = str_replace("\n", "\n$tabs\t", $html); > The tabs added to every line of the form create spaces at the beginning of > every line of text in a textarea. I can understand wanting the HTML code > look tidy and tabbed but every time I edit a textarea, insert it into the > database and bring it back out, it gets moved over a little more. I > personally have commented this line out. > > Line 203 of textarea.php > $html .= preg_replace("/(\r\n|\n|\r)/", '
', $this->_value); > This method seems to work fine in most browsers, but in IE5/mac (the > browser of choice in my company and several of our clients), the text > 
 gets printed out rather than a newline. Obviously, this doesn't > really help any. I have personally replace this line with the one below: > $html .= preg_replace("/(\r\n|\n|\r)/", "\n", $this->_value); You should report the bug on Microsoft's website not here. > After a couple months of usage, I haven't found any side effects of doing > these things. Perhaps they could be introduced into the CVS? -- Martin Tsachev http://martin.f2o.org

« previous php.pear.general (#2255) next »