Hi, I have this content management system that I am working on and have one litle problem.
When inserting entries in the database I convert all newlines from forms with ereg_replace(); like:
$foo = ereg_replace ("\n", "<br>", stripslashes($foo));
but sometimes I need to paste HTML code into the form, eg. a TABLE
The problem then is that <br> will be generated after each <td>, <tr> <table> and so on.
Is there a easy solution to this 🙂 or do I have to make a comprehensive regular expression function to deal with it?
any solution?
regards Thomas A.