Tom: Zeilenumbruch in Textarea

Beitrag lesen

Hello,

Hi,

Wenn Du in eine Textarea eines gesunden Browsers "\n" oder "\r" reinstopfst, dann sollte nach dem Submit auf dem Server stattdessen wieder "\r\n" ankommen. Die Zeilenumbrüche werden also wieder ergänzt.

When a textarea is mutable, its raw value should be editable by the user: the user agent should allow the user to edit, insert, and remove text, and to insert and remove line breaks in the form of "LF" (U+000A) characters.

...

For historical reasons, the element's value is normalised in three different ways for three different purposes. The raw value is the value as it was originally set. It is not normalized. The API value is the value used in the value IDL attribute. It is normalized so that line breaks use "LF" (U+000A) characters. Finally, there is the form submission value. It is normalized so that line breaks use U+000D CARRIAGE RETURN "CRLF" (U+000A) character pairs, and in addition, if necessary given the element's wrap attribute, additional line breaks are inserted to wrap the text at the given width.

Du hast die Hälfte vergessen. Hier geht es um den Submission-Value!

Liebe Grüße aus dem schönen Oberharz

Tom vom Berg

--
 ☻_
/▌
/ \ Nur selber lernen macht schlau
http://bikers-lodge.com