Skip to content

Commit

Permalink
fix cutting of multibyte strings in abstract
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteffen committed Aug 4, 2020
1 parent 92fb686 commit 4e130ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions DNBExportPlugin.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,6 @@ function depositXML($object, $context, $filename) {

$curlError = curl_error($curlCh);

error_log("RS_DEBUG:DNB_PLUGIN:deposit: ".print_r($response,true));
error_log("RS_DEBUG:DNB_PLUGIN:deposit: ".print_r($curlError,true));

if ($curlError) {
// error occured
$param = __('plugins.importexport.dnb.deposit.error.fileUploadFailed.param', array('package' => basename($filename), 'articleId' => $object->getSubmissionId(), 'error' => $curlError));
Expand Down
2 changes: 1 addition & 1 deletion filter/DNBXmlFilter.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ function &process(&$pubObject) {
//remove line breaks in case DNB doesn't like them (they are allowed in XML 1.0 spec)
$abstract = preg_replace("#[\s\n\r]+#",' ',$abstract);
if (strlen($abstract) > 999) {
$abstract = substr($abstract, 0, 996);
$abstract = mb_substr($abstract, 0, 996,"UTF-8");
$abstract .= '...';
}
$abstractURL = $request->url(null, 'article', 'view', array($article->getId()));
Expand Down
4 changes: 2 additions & 2 deletions version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
<version>
<application>dnb</application>
<type>plugins.importexport</type>
<release>1.3.0.0</release>
<date>2020-24-04</date>
<release>1.3.1.0</release>
<date>2020-04-08</date>
</version>

0 comments on commit 4e130ee

Please sign in to comment.