BibApp/BibApp — Issue #92: Strip line breaks from RIS abstracts
Author: jstirnaman
Created: 2012-02-28 21:59:33+00:00
State: open

Steps to reproduce:
1. In PubMed, find a citation that (violating the NLM journal schema) contains line breaks in the abstract, e.g. http://www.ncbi.nlm.nih.gov/pubmed/21969284
2. "Send to" > File > MEDLINE
3. The resultant output will import successfully to BibApp as it passes through the Medline importer which strips line breaks before going to Solr. However, if the same output is passed first to Zotero and exported as RIS and the RIS is then imported into BibApp, the import will fail with an error like
Import error:Hyperosmolar dextrose injection for recalcitrant Osgood Schlatter disease could not be imported. 400 "ERROR: [doc=Work-27729] multiple values encountered for non multiValued field abstract: [OBJECTIVE , , , ,

ris_importer.rb does not perform the equivalent of medline_importer.rb's strip_line_breaks() on any fields.

Is there any reason why strip_line_breaks() and remove_trailing_period() shouldn't be moved to base_importer.rb?