This is partly related to the age-old unix vs. windows newline LF/CRLF dilemma. I don't love my solution, but I have most of that figured out... (nonetheless any general guidance related to cross-browser newlines appreciated!). FF can send data from html textareas in a way that the newlines are stored in the db consistently with IE (and my Java client). The other clients can read these FF-authored strings newline and all.
My main remaining issue is how to correctly retrieve and display the strings in FF. How can I identify newlines in xml attributes? For example, I have an xhr returning a set of form fields to render via javascript:
<field name="desc" displayname="Description" value="i
am
in
ff" type="string" length="240"> </field>
(I haven't confirmed, but I'm pretty sure those are CRLFs in the value attribute - same as I stored previously...) This value will get rendered into a textarea.
But when I try to read the attribute in FF, var value = fieldNode.getAttribute( "value" ); I get value="i am in ff"
I know if i convert the CRLF to \n on the server, FF will work; but i think this may cause problems for our other clients. I'd like to find a client-side and client-specific solution.
If I could detect the newlines, I could substitute in
or whatever. I just need a way to detect them.
ps - no responses after more than a month... why am I the only one with this problem?? guess I'll have to figure it out myself :(