Islandora-Labs / islandora_solution_pack_oralhistories

Adds all required Fedora objects to allow users to ingest and retrieve Oral Histories (video/audio) files through the Islandora interface
GNU General Public License v3.0
13 stars 23 forks source link

INDEXMEDIATRACK invalid if non escaped characters exist #75

Closed kimpham54 closed 7 years ago

kimpham54 commented 7 years ago

Related to https://github.com/digitalutsc/islandora_solution_pack_oralhistories/issues/58

When transcript content gets edited through the UI interface, this updates the original TRANSCRIPT datastream and CDATA is added to the different tags. INDEXMEDIATRACK however is not updated.

Steps to Reproduce

  1. Edit an oral history with a transcript in transcript viewer using non escaped characters, such as &, %.

Expected Behaviour INDEXMEDIATRACK gets updated with CDATA and properly captures the non escaped characters

Actual Behaviour CDATA is not added to INDEXMEDIATRACK.

content in the cue with non escaped characters disappears in INDEXMEDIATRACK. removing the escaped characters through the UI restores the original text.

The following error is displayed:

Warning: SimpleXMLElement::addChild(): unterminated entity reference && KIM in islandora_oralhistories_create_vtt_indexing_datastream() (line 105 of /var/www/drupal/sites/all/modules/islandora_solution_pack_oralhistories/includes/derivatives.inc).
Warning: SimpleXMLElement::addChild(): unterminated entity reference && KIM in islandora_oralhistories_create_vtt_indexing_datastream() (line 105 of /var/www/drupal/sites/all/modules/islandora_solution_pack_oralhistories/includes/derivatives.inc).
Warning: SimpleXMLElement::addChild(): unterminated entity reference && KIM KIM KIM in islandora_oralhistories_create_vtt_indexing_datastream() (line 105 of /var/www/drupal/sites/all/modules/islandora_solution_pack_oralhistories/includes/derivatives.inc).
Natkeeran commented 7 years ago

Nice catch @kimpham54. I've created a PR (https://github.com/digitalutsc/islandora_solution_pack_oralhistories/pull/77) to address this issue:

MarcusBarnes commented 7 years ago

Addressed in pull-request https://github.com/digitalutsc/islandora_solution_pack_oralhistories/pull/77 (merged with commit https://github.com/digitalutsc/islandora_solution_pack_oralhistories/commit/88e90224821243b4da5d0bf169c9c6fd4e10e08c).