Pubmed XML plugin not escaping special characters correctly in OJS3

I’ve seen similar issue reported for other XML exports (native, crossref, etc.) on OJS 2 and thought it’s worth to point out the issue with PubMed XML plugin. We are running OJS 3.1.1.4

PubMed XML export of an issue resulted in a file with “unterminated entity reference” errors.

Upon digging it was traced back to the journal title having “&” in the masthead. We replaced it with “and” for a quick fix, but since it’s not uncommon for journals to use “&” in the title, this may come up again.

P.S. PubMed XML validator is helpful for troubleshooting if you are running into other kinds of errors Citation file validator - PubMed Data Management - NCBI

2 Likes

To follow up - apparently having “&” in the abstract or author affiliation also throws PubMed export off. Considering that university departments with multiple divisions often use “&” to denote these in the affiliation, this must be another common case for the exports to fail.

this is because & character in abstract is converted to & before being saved in database and then converted to & in pubmed XML file.

Resolved in & characters in PubMed exports are not escaped properly · Issue #5486 · pkp/pkp-lib · GitHub