Bug 49979 - Trailing carriage return stripped from text form field
Summary: Trailing carriage return stripped from text form field
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Android Android
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-23 09:32 PST by Jamie
Modified: 2010-11-23 22:55 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jamie 2010-11-23 09:32:16 PST
On Android 2.1 and 2.1 and iPhone 3GS (other versions not tested) if a form field of type 'text' has a trailing carriage return, that carriage return is not submitted.  Leading carriage returns are not stripped, nor are carriage returns within the text of a field value, only trailing carriage returns seem to be stripped.

Since this issue exists in the android and iphone browsers, but not chrome and safari (on windows 7), I'm not sure if this is a webkit bug or not.  A test case is below.

<html>
<head><title></title></head>
<body>
<!--
if this page renders as #test# then the carriage return has been stripped
if it renders as:
#test
#
then it hasn't
-->
<pre>
<? echo "#" . $_GET['foo1'] . "#" ?>
</pre>
<form name="frmTest" id="frmTest" method="GET" action="">
<input type="hidden" name="foo1" value="test
"/><!-- note the carriage return inside field 'foo1' -->
<input type="submit" value="go" />
</form>
</body>
</html>