Skip to content
Snippets Groups Projects
Commit de85e0d5 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

Merge branch 'hotline#99825_deauville_pb_dans_le_flux_oai' into 'hotline'

hotline #99825 : oai server : fix escaping of dc:rights

See merge request !3295
parents 39d87d7d 8535440b
Branches
Tags
2 merge requests!3298Hotline,!3295hotline #99825 : oai server : fix escaping of dc:rights
Pipeline #8643 passed with stage
in 40 minutes and 52 seconds
- ticket #99825 : Serveur OAI : Correction de l'échappement du contenu de l'élément Dublin Core rights
\ No newline at end of file
......@@ -200,7 +200,7 @@ class Class_Notice_DublinCoreVisitor {
* @param $album Class_Album
*/
public function visitAlbum($album) {
$this->_xml .= $this->_builder->rights((null === $album) ? '' : $album->getDroits());
$this->_xml .= $this->_builder->rights($this->cdata((null === $album) ? '' : $album->getDroits()));
}
......
......@@ -231,6 +231,7 @@ class OAIControllerListRecordsInOaiDcBokehFormatTest
'visible' => 1,
'status' => Class_Album::STATUS_VALIDATED,
'created_at' => '2001-12-14',
'droits' => 'Neurdein & Cie',
'categorie' => $this->fixture('Class_AlbumCategorie',
['id' => 3,
'libelle' => 'Fond Magique']),
......@@ -323,6 +324,12 @@ class OAIControllerListRecordsInOaiDcBokehFormatTest
}
/** @test */
public function shouldContainsRightsNeurdeinAndCie() {
$this->_assertMetadataContains('//dc:rights', 'Neurdein & Cie');
}
protected function _assertHeaderContentAt($header, $content, $position) {
$path = sprintf('//oai:ListRecords/oai:record[%s]/oai:header/oai:%s',
$position, $header);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment