Im doing a textarea with jeditable. The content is saved and loaded from a database. But im having some problems in the way IE and FF handles linebreaks differently.
After some debugging i've found a mysterious behavior in FF. For example if i input in textarea:
1
2
It will return
1<br>2
Which is fine. But if i write:
1
2
3
It returns
1<br>2<br>
3
How come? And how am i supposed to do regexp on this abnormal behaviour.
Atm. im doing this regexp:
data : function(value, settings) {
/* Convert <br> to newline. */
retval = value(/<br[\s\/]?>/gi, '\n');
return retval;
},
Which works fine in IE, but in FF (because of this behaviour) it returns more linebreaks than supposed to.
Can you help ?
Thanks in advance