hi all,
this is my first email and I'm trying to solve my first bug... so any help would be appreciate :)
As marc suggested I'm trying to solve this bug https://sourceforge.net/tracker2/?func=detail&aid=2107583&group_id=2...
I think i've found a way to solve it but I'm not really happy with the solution.
The main problem with this bug is when you write this 2 html the submited value is the same (and it shouldn't) -------------------------------------------- code 1: <textarea>hi</textarea> -------------------------------------------- Code 2 (see the \n before 'hi'): <textarea> hi</textarea> --------------------------------------------
I can't understand why the textarea tag ignores the first \n (or \r). The easiest way to solve it (but I don't like it) is add an extra \n just before the text like this -------------------------------------------- Code 3 (see the \n\n before 'hi'): <textarea>
hi</textarea> -------------------------------------------- As this line is ignored all the times it should work (I don't know if all the browsers ignores this \n...)
do you have any better ideas? Attached you can see a php example to reproduce the bug.
Isart Montane a écrit :
hi all,
this is my first email and I'm trying to solve my first bug... so any help would be appreciate :)
As marc suggested I'm trying to solve this bug https://sourceforge.net/tracker2/?func=detail&aid=2107583&group_id=2...
I think i've found a way to solve it but I'm not really happy with the solution.
The main problem with this bug is when you write this 2 html the submited value is the same (and it shouldn't)
code 1:
<textarea>hi</textarea>
Code 2 (see the \n before 'hi'):
<textarea> hi</textarea> --------------------------------------------
I can't understand why the textarea tag ignores the first \n (or \r). The easiest way to solve it (but I don't like it) is add an extra \n just before the text like this
Code 3 (see the \n\n before 'hi'):
<textarea>
hi</textarea>
As this line is ignored all the times it should work (I don't know if all the browsers ignores this \n...)
do you have any better ideas? Attached you can see a php example to reproduce the bug.
Hi Isart,
Remember that in HTML, \n means nothing. What you need is to generate a line break like this: <br />.
Look at the source HTML of the page when you browse this table, you'll see <br />OK
but when editing the row, the <br /> is not generated, causing the problem.
When browsing, sql.php is called. When editing, tbl_change.php is called.
Note: to see the problem when editing, in config.inc.php you'll need this: $cfg['CharEditing'] = 'textarea';
Marc