Bug #2564
closedescaped "less than" in inlinedata causes invalid eml output
0%
Description
From: inigo san gil <isangil@lternet.edu>
> > My valid EML file
(http://www.cedarcreek.umn.edu/data/emlFiles/pl00e001.xml) has the
following line (content):|Field|Plot|Ntrt|NitrAdd|Date|Taxon|Species |Biomass |Prop <== Labels
However, once harvested, the metacat link to the document
http://metacat.lternet.edu/knb/metacat?action=read&qformat=xml&docid=knb-lter-cdr.7901001.2has that same line slightly changed to: |Field|Plot|Ntrt|NitrAdd|Date|Taxon|Species |Biomass |Prop <== Labels
I noticed that the evil < sign appeared in the
inlinedata element. Inline content is handled differently than the
rest of the document - it is stored on the file system (the
metacat_inline_data folder) rather than in the relational db.
It is interesting to note that a < sign anywhere else in the eml
document will be handled correctly (well... it will be displayed as
< at least ... see bug 2517 ). Only in the inlinedata section will this cause the eml
output from metacat to be invalid.
This is most likely related to the DocumentImpl.toXml() function, specifically around line 1158 of DocumentImpl.java
Reader reader = Eml200SAXHandler.readInlineDataFromFileSystem(fileName);