PHP Classes

textarea problem

Recommend this page to a friend!

      Clean Output  >  All threads  >  textarea problem  >  (Un) Subscribe thread alerts  
Subject:textarea problem
Summary:textarea problem text with tabs
Messages:4
Author:ceasar
Date:2006-12-17 13:38:38
Update:2009-01-07 14:58:07
 

  1. textarea problem   Reply   Report abuse  
Picture of ceasar ceasar - 2006-12-17 13:38:38
Hai,
Thanks for this great class.

I have a problem with textarea's
If you have text as a value in a textarea it will show with tabs

I have solved this as followed

//$fixedtextvalue = preg_replace("/>(\s|\t)*</U", ">\n<", $unfixedtextvalue);
$fixedtextvalue = preg_replace("/>(\s|\t)*<^(textarea)/U", ">\n<", $unfixedtextvalue);

But when you post a form with text as a value it will show tabs again.
I don't know how to solve this.

Perhaps you could have a look at it

Anyway, thanks for this nice class

  2. Re: textarea problem   Reply   Report abuse  
Picture of Jon Gjengset Jon Gjengset - 2006-12-18 00:18:29 - In reply to message 1 from ceasar
Hi =)
Good to know that you enjoy my class ^^

The issue with textareas, pre-tags and code-tags should be resolved in the new 1.3 version (18. Dec) :)

Jon

  3. Re: textarea problem   Reply   Report abuse  
Picture of jeff coolen jeff coolen - 2007-08-01 17:02:58 - In reply to message 2 from Jon Gjengset
I'm still getting this problem
if the textarea is empty there are some tabs and line feeds added

Other than that this is one of the best classes I've added to my code.

  4. Re: textarea problem   Reply   Report abuse  
Picture of Jon Gjengset Jon Gjengset - 2009-01-07 14:58:07 - In reply to message 3 from jeff coolen
As of the newest version of this class, this issue should be properly fixed for all cases of this problem!