We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 8330 - datacite export plugin and html entities
datacite export plugin and html entities
Status: RESOLVED FIXED
Product: OJS
Classification: Unclassified
Component: Plug-ins
2.4.2
All All
: P3 normal
Assigned To: PKP Support
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-24 05:59 PDT by rm
Modified: 2013-11-26 14:53 PST (History)
3 users (show)

See Also:
Version Reported In:
Also Affects:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rm 2013-07-24 05:59:10 PDT
(previously posted on https://github.com/pkp/ojs/issues/83)


if a field contains html text, the datacite export plugin will send metadata text with html entities inside. should be better to strip any html char

example:

$ curl http://data.datacite.org/application/x-datacite+xml/10.6092/ISSN.1825-9618/3069
Comment 1 Bozana Bokan 2013-07-24 09:16:04 PDT
I will then take a look :-)
Thanks!
Comment 2 Bozana Bokan 2013-07-25 15:04:01 PDT
datacite export plugin and html entities
https://github.com/pkp/ojs/commit/d580cec6104ea2a45f9de2e2d92c200f2dc03566
Comment 3 Andrea Marchitelli 2013-07-25 22:36:17 PDT
Updated the code, but HTML entities are still there:
https://www.medra.org/servlet/view?lang=en&doi=10.4403/jlis.it-8766
Comment 4 Bozana Bokan 2013-07-26 03:13:50 PDT
Hi Andrea,

Hmmm... If I understand it correctly, this is mEDRA export, right?

I see it is an abstract, that should be handled with the function 'createElementWithText' in the class 'plugins/importexport/medra/classes/DOIExportDom.inc.php'. On github this file is a symbolic link to the class 'plugins/importexport/datacite/classes/DOIExportDom.inc.php' which I changed yesterday, so it should actually work :-(

How did you do the code update? Using git?
If using a patch I don't think the class in the medra plugin changed.
Could you thus please check if there is the following code line in your function 'createElementWithText' in the class 'plugins/importexport/medra/classes/DOIExportDom.inc.php':
$elementContent =& XMLCustomWriter::createTextNode($this->getDoc(), String::html2text($value));

Else, I saw that I should strip the HTML entities from some other metadata/text fields for mEDRA export, that don't use the function above, e.g. author's bio statement. I will take a look now, but this wasn't the problem in your example.

Thanks!
Comment 5 Bozana Bokan 2013-07-26 03:51:02 PDT
medra export plugin and html entities
https://github.com/pkp/ojs/commit/e5c001b49c11c50ec6355e9578af493d42d38944
Comment 6 Andrea Marchitelli 2013-07-26 07:03:56 PDT
Hi Bozana,
the problem was that I didn't modified 
'plugins/importexport/medra/classes/DOIExportDom.inc.php':
$elementContent =& XMLCustomWriter::createTextNode($this->getDoc(), String::html2text($value));

Now it works.

I applied your new commit 
https://github.com/pkp/ojs/commit/e5c001b49c11c50ec6355e9578af493d42d38944
and it's ok
https://www.medra.org/servlet/view?lang=en&doi=10.4403/jlis.it-8766

Thanks!
Comment 7 Bozana Bokan 2013-08-01 02:38:02 PDT
medra export plugin and html entities
https://github.com/pkp/ojs/commit/9b5af03204bfc32449a801de7c70f30dc21cd677
Comment 8 Alec Smecher 2013-11-26 14:34:45 PST
Bozana, is this entry ready to be closed? Thanks!
Comment 9 Bozana Bokan 2013-11-26 14:45:11 PST
Yup, yup :-)
Comment 10 Alec Smecher 2013-11-26 14:53:01 PST
Great, thanks!