Opened 8 years ago

Closed 8 years ago

#13855 closed defect (worksforme)

form submit should apply CRLF textarea HTML value transformation for SimpleTextArea

Reported by: darth Owned by: Douglas Hays
Priority: high Milestone: tbd
Component: Dijit - Form Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:

Description

dijit.form.SimpleTextarea? stores the value with line feeds as a simple \n \r\n is eliminated and filtered out and left as \n.

While this is correct behavior, HTML spec states that on submit, the raw .value needs to be transformed to replace every \n with the correct \r\n.

Please see ian hickson's explanation. http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-January/029665.html

Spec http://www.w3.org/TR/html5/the-button-element.html#the-textarea-element

Test http://jsfiddle.net/Darth/kHZsE/ Enter multiple lines in the textarea Submit should happen with \r\n while raw .value should only have \n

Attachments (1)

13855.html (1.2 KB) - added by Douglas Hays 8 years ago.
file showing consistent behavior between native TEXTAREA and SimpleTextarea?

Download all attachments as: .zip

Change History (3)

comment:1 Changed 8 years ago by Douglas Hays

Not sure I understand, the browser (user agent) is responsible for changing LF to CRLF since it handles form submit. What is the SimpleTextArea? widget doing incorrectly?

Changed 8 years ago by Douglas Hays

Attachment: 13855.html added

file showing consistent behavior between native TEXTAREA and SimpleTextarea?

comment:2 Changed 8 years ago by Douglas Hays

Resolution: worksforme
Status: newclosed

I attached a testcase showing that both programmatical values AND the submitted values of a native TEXTAREA and SimpleTextarea? widget are identical (tested using Chrome 13/Win7).

Note: See TracTickets for help on using tickets.