digitalutsc / islandora_web_annotations

An Islandora module that enables annotation on Islandora objects, following the W3C Web annotation model.
GNU General Public License v3.0
7 stars 5 forks source link

tag rendering in webvtt #216

Closed kimpham54 closed 6 years ago

kimpham54 commented 7 years ago

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