OJS 3.3.0.8: undescores in citation files with Firefox

Hello everyone,

I am experiencing with OJS 3.3.0.8 the same problem mentioned in this post:

and I have already applied the patch proposed in this post:

Despite this, when I download a file in EndNote or BibTex format using Firefox, the downloaded file is preceded by an underscore.

Any suggestion?

Thanks,
Alfredo

You probably also need to update plugins/generic/citationStyleLanguage/CitationStyleLanguagePlugin.inc.php:

diff is:

--- plugins/generic/citationStyleLanguage/CitationStyleLanguagePlugin.inc.php	2021-08-31 12:03:24.000000000 -0300
+++ /var/www/ojs/plugins/generic/citationStyleLanguage/CitationStyleLanguagePlugin.inc.php	2024-09-06 15:08:49.238028571 -0300
@@ -475,7 +475,7 @@
 
         $encodedFilename = urlencode(substr($article->getLocalizedTitle(), 0, 60)) . '.' . $styleConfig['fileExtension'];
 
-		header("Content-Disposition: attachment; filename*=UTF-8''\"$encodedFilename\"");
+		header("Content-Disposition: attachment; filename*=UTF-8''$encodedFilename");
 		header('Content-Type: ' . $styleConfig['contentType']);
 		echo $citation;
 		exit;

Edit: For completeness, to fix the issue I first cited, I updated plugins/generic/citationStyleLanguage/CitationStyleLanguagePlugin.inc.php as described above, and also lib/pkp/classes/services/PKPFileService.inc.php.

1 Like

This topic was automatically closed after 3 days. New replies are no longer allowed.