From 23cae9a3edafa2efc9abb93c161f763ada3c9790 Mon Sep 17 00:00:00 2001 From: Avram Lyon Date: Thu, 10 Mar 2011 07:36:14 +0000 Subject: [PATCH] Trans: Fix entities in NCBI --- translators/NCBI PubMed.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/translators/NCBI PubMed.js b/translators/NCBI PubMed.js index fbfacdaf7..3c9c24be5 100644 --- a/translators/NCBI PubMed.js +++ b/translators/NCBI PubMed.js @@ -9,7 +9,7 @@ "priority":100, "configOptions":{"dataMode":"block"}, "inRepository":true, - "lastUpdated":"2011-02-10 00:28:19" + "lastUpdated":"2011-03-10 10:15:00" } function detectWeb(doc, url) { @@ -196,8 +196,11 @@ function doImportFromText(text) { } } // We use a regex to remove the section labels - newItem.abstractNote = article.Abstract.AbstractText.toString() - .replace(/<\/?AbstractText\s*(?:Label=")?([^">]+)?[^>]*>/g, "$1\n"); + // also, we have entities to clear up + newItem.abstractNote = Zotero.Utilities.unescapeHTML( + article.Abstract.AbstractText.toString() + .replace(/<\/?AbstractText\s*(?:Label=")?([^">]+)?[^>]*>/g, "$1\n") + ); newItem.DOI = xml.PubmedArticle[i].PubmedData.ArticleIdList.ArticleId.(@IdType == "doi" ).text().toString(); newItem.publicationTitle = Zotero.Utilities.capitalizeTitle(newItem.publicationTitle);