Closed
Bug 708620
Opened 13 years ago
Closed 13 years ago
Whine to console when a form is submitted using an encoding that can't represent all of Unicode
Categories
(Core :: DOM: Core & HTML, enhancement)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla12
People
(Reporter: hsivonen, Assigned: hsivonen)
Details
Attachments
(1 file, 1 obsolete file)
5.92 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
See http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-November/033991.html
When Web apps that solicit textual input from users transfer the input to the server using an encoding that can't encode all of Unicode, user input (including names of people) may break.
To call Web author attention to this problem, Firefox should whine to console when a form is submitted using an encoding that can't encode all of Unicode and, therefore, can corrupt user input.
Assignee | ||
Comment 1•13 years ago
|
||
GB18030 can encode all of Unicode, so excluding it from the whining. UTF-16 is mapped to UTF-8 before the whining check.
Assignee: nobody → hsivonen
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•13 years ago
|
||
Attachment #582281 -
Attachment is obsolete: true
Attachment #582852 -
Flags: review?(bugs)
Comment 3•13 years ago
|
||
Comment on attachment 582852 [details] [diff] [review]
Whine to console about form submission encodings that can't encode all of Unicode
This can be a bit noisy, but is an important thing.
Attachment #582852 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Thanks for the r.
https://hg.mozilla.org/integration/mozilla-inbound/rev/f4f47800d2ff
Flags: in-testsuite+
Comment 5•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
Comment 6•13 years ago
|
||
(In reply to Henri Sivonen (:hsivonen) from comment #0)
> See
> http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-November/033991.html
>
> When Web apps that solicit textual input from users transfer the input to
> the server using an encoding that can't encode all of Unicode, user input
> (including names of people) may break.
Actually it is a problem of poorly-written server-side software as the reply says. If the encoding can not represent a character, the character will be converted to character reference. Server-side software can handle to repair the original character. If the form encoding is changed to UTF-8, server-side software (and all existing data) needs to be updated anyway. I doubt it deserves a warning.
Assignee | ||
Comment 7•13 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #6)
> If the form encoding is changed to UTF-8,
> server-side software (and all existing data) needs to be updated anyway.
Yes, the server needs fixing, too. It doesn't make sense to fix just the form.
Maybe the wording needs to be tweaked to make this clear?
Assignee | ||
Comment 8•13 years ago
|
||
Oh, and the server cannot unambigously repair submission where something has been converted to character references, because it can't tell if substrings that look like character references are user input or artifacts of lossy conversion.
Updated•6 years ago
|
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•