Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #6346
Fixes the problem of line breaks in tag fields (subjects/places/times/people) causing items after the line break to be lost.
Technical
I had hoped that the csv.py library being used to parse tag data would have a configuration option to ignore line breaks, but the documentation indicates that the reader() method explicitly ignores attempts to redefine line breaks (which is what caused the bug in the first place).
Failing that, the best solution seemed to be to just strip out any line breaks immediately before parsing. I tested on both Mac and Windows to verify that the form is sending \r\n regardless of platform.
Testing
Edit a work subject list, adding a line break between entries. They should now all save correctly.
Stakeholders
@seabelis @cdrini @mekarpeles
Attribution Disclaimer: By proposing this pull request, I affirm to have made a best-effort and exercised my discretion to make sure relevant sections of this code which substantially leverage code suggestions, code generation, or code snippets from sources (e.g. Stack Overflow, GitHub) have been annotated with basic attribution so reviewers & contributors may have confidence and access to the correct context to evaluate and use this code.