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
Product: OJS
Classification: Unclassified
Component: Plug-ins
All All
: P3 normal
Assigned To: PKP Support
Depends on:
  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:


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


$ 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 :-)
Comment 2 Bozana Bokan 2013-07-25 15:04:01 PDT
datacite export plugin and html entities
Comment 3 Andrea Marchitelli 2013-07-25 22:36:17 PDT
Updated the code, but HTML entities are still there:
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.

Comment 5 Bozana Bokan 2013-07-26 03:51:02 PDT
medra export plugin and html entities
Comment 6 Andrea Marchitelli 2013-07-26 07:03:56 PDT
Hi Bozana,
the problem was that I didn't modified 
$elementContent =& XMLCustomWriter::createTextNode($this->getDoc(), String::html2text($value));

Now it works.

I applied your new commit 
and it's ok

Comment 7 Bozana Bokan 2013-08-01 02:38:02 PDT
medra export plugin and html entities
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!