codeforamerica / chime

A city-focused content management system
http://chimecms.org/
BSD 3-Clause "New" or "Revised" License
35 stars 12 forks source link

Strip whitespace from task description #528

Closed tmaybe closed 8 years ago

tmaybe commented 8 years ago

Now that the task description entry form has a text area you can submit task descriptions with all kinds of crazy whitespace. This strips all excessive whitespace from submitted task descriptions.

wpietri commented 8 years ago

Do we really want to strip paragraph breaks? To me those have meaning; I hate when forms lose them. But maybe that doesn't matter here.

Also, it kills me that we need an integration test to verify this, but I agree there isn't an easy-to-extract testable unit here, so I'm fine with this for now.

tmaybe commented 8 years ago

I can't think of a case in which we'd want to preserve tabs or carriage returns in an activity description...

wpietri commented 8 years ago

Cool by me then.