Homec4science

Add an extra newline after <textarea> to preserve textarea content beginning…

Authored by epriestley <git@epriestley.com> on Dec 6 2015, 00:37.

Description

Add an extra newline after <textarea> to preserve textarea content beginning with newlines

Summary:
Fixes T8707. See that task for discussion. Browser behavior is apparently to ignore a newline immediately following a <textarea>, and ostensibly has been since the early 1800s.

This is the same fix Rails used when it encountered this issue in 2011, which gives me some confidence it is correct.

Test Plan:

  • Edited a task with leading newlines in the description.
  • Newlines were preserved correctly across multiple edits.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8707

Differential Revision: https://secure.phabricator.com/D14688

Details

Committed
epriestley <git@epriestley.com>Dec 6 2015, 00:46
Pushed
aubortJan 31 2017, 17:16
Parents
rPH75f126c3d039: Fix a loopy comment
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHec71dcd8e9a1: Add an extra newline after <textarea> to preserve textarea content beginning… (authored by epriestley <git@epriestley.com>).Dec 6 2015, 00:46