diff --git a/module/VuFind/src/VuFind/RecordDriver/EDS.php b/module/VuFind/src/VuFind/RecordDriver/EDS.php
index 549eb607143..f9387df2f02 100644
--- a/module/VuFind/src/VuFind/RecordDriver/EDS.php
+++ b/module/VuFind/src/VuFind/RecordDriver/EDS.php
@@ -451,7 +451,7 @@ public function getAllSubjectHeadingsFlattened()
{
$subject_arrays = array_map(
function ($data) {
- return explode(', ', $data['Data']);
+ return explode(', ', rtrim(strip_tags($data['Data']), '.'));
},
$this->getItems(null, null, 'Su')
);
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/EDSTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/EDSTest.php
index f2f23059d23..655a34a1596 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/EDSTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/RecordDriver/EDSTest.php
@@ -573,8 +573,8 @@ public function testGetAllSubjectHeadingsFlattened(): void
$driver = $this->getDriver('valid-eds-record');
$this->assertEquals(
[
- 'PSYCHOTHERAPY',
- 'METAPHOR.',
+ 'PSYCHOTHERAPY',
+ 'METAPHOR',
],
$driver->getAllSubjectHeadingsFlattened()
);