Bug 21476: Fix HTML5 media from playing in the OPAC - incorrect filters

This patch makes a correction to a template filter to prevent
incorrectly-encoded HTML in media source links which were preventing
media from embedding correctly in the OPAC.

To test, apply the patch and enable the HTML5MediaEnabled and
HTML5MediaYouTube system preferences.

- Edit a record to include links to videos in 856$u. For example:
  - https://www.youtube.com/watch?v=grTwH6Evdfc
    - https://archive.org/download/POPEYEMeetsSindbadTheSailor1936/POPEYE%20meets%20Sindbad%20The%20Sailor%20%281936%29.ogv

    View the record in the OPAC and confirm that the videos display in
    the
    "Play media" tab and that they play correctly.

Tested and works as described, also matches the intranet code.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 7736b5c2e3)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Nick Clemens 2018-10-23 12:30:25 +00:00 committed by Martin Renvoize
parent ec7e569d55
commit 18bb4d5e66
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 4 additions and 4 deletions

View File

@ -1003,10 +1003,10 @@
[% FOREACH HTML5MediaSet IN HTML5MediaSets %]
<p>
[% SET ctrl_preload = ' controls preload=none' #translatability %]
<[% HTML5MediaParent _ ctrl_preload %] >
<[% HTML5MediaSet.child _ ' src="' _ HTML5MediaSet.srcblock _'"' _ HTML5MediaSet.typeblock %] />
<span>[[% HTML5MediaParent %] tag not supported by your browser.]</span>
</[% HTML5MediaParent %]>
<[% HTML5MediaParent _ ctrl_preload | html %] >
<[% HTML5MediaSet.child | html %] src="[% HTML5MediaSet.srcblock | html %]" [% HTML5MediaSet.typeblock | html %] />
<span>[[% HTML5MediaParent | html %] tag not supported by your browser.]</span>
</[% HTML5MediaParent | html %]>
</p>
[% END %]
</div>