Okay, I took a look at the actual data going over the wire when I clicked Preview, and learned something rather perplexing.
Request
(<...>'d bits removed "just in case"

):
POST /forums/forums/thread-post.asp?action=postreply HTTP/1.1
Host: www.hpcfactor.com
Content-Length: 216
Accept: */*
User-Agent: Mozilla/5.1 (X11; U; Linux i686; en-US; rv:1.8.0.3) Gecko/20060425 SUSE/1.5.0.3-7 Hv3/alpha
Referer: http://www.hpcfactor.com/forums/forums/thread-view.asp?tid=1...
Cookie: <...>; bbsmid=29178; password=<...>; guestID=; guestStart=;
Content-Type: application/x-www-form-urlencoded
Connection: keep-alive
fid=47&replyto=157645&mid=-1&filtercrlf=&subject=Re%3A+Bugreport%3A+Forum+newline+parsing+error+with+hv3+web+browser&messagebody=Here+are+some+newlines%3A+%5B%0A%0A%0A%0A%0A%0A%0A%0A%0A%5D&emoticons=1&preview=Preview
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 29348
Content-Type: text/html
Expires: Fri, 14 Mar 2014 09:05:50 GMT
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Fri, 14 Mar 2014 09:06:50 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
(snip)
<td valign='top' class='messagemiddle'><div class="messageMainBody">Here are some newlines: [
]</div></td>
(snip)
<td valign='top' class='messagecellbody' width='90%'><textarea style='width:95%' rows='20' cols='80' class='bbseditbox' name='messagebody' id='messagebody'>Here are some newlines: [
]</textarea></td>
Notice anything wrong with this picture?
The lower
<textarea> should have literal newlines in it
(combinations of 0x0D and/or 0x0A - that makes sense.
...But
the <div> has literal newlines in it too (?)! No can haz any
<br />s!
I'm wondering... you mentioned encoding, yet I don't see any references in the request. Maybe that's what's doing it?
At any rate, the above is a direct copy from Wireshark; I've attached the compressed dump of hv3's form POST and the site's response
(pretty much the above plus the rest of the page HTML
).
As an irritating aside, if you submit an < or an >, the forum will reformat it into a literal < or >
in the preview box once the preview has been submitted. This makes submitting HTML mixed in with "no thanks I want that as text" a case of
while(editing) { preview(); click_back(); }
-i336
Attachments
----------------
hv3.pcap.xz (7KB - 0 downloads)