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

tag rendering in webvtt #116

Open kimpham54 opened 6 years ago

kimpham54 commented 6 years ago

From https://github.com/digitalutsc/islandora_web_annotations/issues/216

Came out of the original interest to render tags from WebVTT files. Consider filter_xss() or other approach.

From @ulsdevteam and @bgilling:

In the “uls_install” branch of our code for islandora_solution_pack_oralhistories the transcripts_ui code has been removed as a submodule and treated like a regular drupal module (but kept as a dependency).

The function that I wrote to rewrite the tags as html is here: https://github.com/ulsdevteam/islandora_solution_pack_oralhistories/blob/uls_install/includes/utilities.inc#L297-L321 – and is called during the compose_vtt_transcript_as_transcripts_ui() routine above this (also in includes/utilities.inc).

In order to let the rewritten html through (the tag becomes a

), the filter_xss call is in here: transcript_ui/theme/transcripts_ui.theme.inc - https://github.com/ulsdevteam/transcripts_ui/blob/master/theme/transcripts_ui.theme.inc#L80. Finally, these class names used in the

elements needed some styles – which I added to the bottom of the transcript_ui/css/transcripts-ui.css, like https://github.com/ulsdevteam/transcripts_ui/blob/master/css/transcripts-ui.css#L389-L395