Skip to content

Commit

Permalink
Strip tags in EDS getAllSubjectHeadingsFlattened
Browse files Browse the repository at this point in the history
  • Loading branch information
damien-git committed Oct 8, 2024
1 parent 0621131 commit 58038e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion module/VuFind/src/VuFind/RecordDriver/EDS.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,8 @@ public function testGetAllSubjectHeadingsFlattened(): void
$driver = $this->getDriver('valid-eds-record');
$this->assertEquals(
[
'<a href="../EDS/Search?lookfor=%22PSYCHOTHERAPY%22&amp;type=SU">PSYCHOTHERAPY</a>',
'<a href="../EDS/Search?lookfor=%22METAPHOR%2E%22&amp;type=SU">METAPHOR.</a>',
'PSYCHOTHERAPY',
'METAPHOR',
],
$driver->getAllSubjectHeadingsFlattened()
);
Expand Down

0 comments on commit 58038e8

Please sign in to comment.