If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Firefox eats whitespace in input values

RESOLVED INVALID

Status

()

Firefox
General
--
major
RESOLVED INVALID
14 years ago
11 years ago

People

(Reporter: Felipe, Assigned: Blake Ross)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8

Firefox mangles tabs in form input variables, particularly:

1) leading tabs
2) trailing tabs
3) consecutive inner tabs (sometimes)

Reproducible: Always
Steps to Reproduce:
Execute the following source: (the spaces in the input value are tabs, sometimes
paired)
Submit the form.
------------
<html>
<head>
</head>
<body>
<form method='get'>
<input id='oof' name='boof' type='text' value='	1	3	5		7		' />
</form>
<script type='text/javascript'>
alert("|"+document.getElementById('oof').value+"|");
</script>
</body>
</html>
Actual Results:  
The GET submission, as well as several other aspects of the page, strip leading
and trailing tabs and reduce consecutive tabs to one.

Expected Results:  
Leave the data as-is upon submission.

This is useful for spreadsheet-type applications, where tabs can be used as
separators to create "virtual arrays" with HTML input tags.

Internet Explorer handles this as expected, while Safari mangles it yet worse
than Mozilla does.
(Reporter)

Updated

14 years ago
Flags: blocking0.9+
(Reporter)

Updated

14 years ago
Flags: blocking0.9+
(Reporter)

Updated

14 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → INVALID
(Reporter)

Comment 1

14 years ago
Never mind - just read the spec on CDATA. ;-)

Comment 2

11 years ago
Hi,

  I face similar issue with Firefox 2.0.  Could be please explain how to fix this?

Thanks in Advance.

Duplicate of this bug: 369586
You need to log in before you can comment on or make changes to this bug.