diff --git a/js/h5p.js b/js/h5p.js index ee1888a..a7096e7 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -378,8 +378,11 @@ H5P.init = function (target) { // Insert H5Ps that should be in iframes. H5P.jQuery('iframe.h5p-iframe:not(.h5p-initialized)', target).each(function () { var contentId = H5P.jQuery(this).addClass('h5p-initialized').data('content-id'); + const contentData = H5PIntegration.contents['cid-' + contentId]; + const language = contentData && contentData.metadata && contentData.metadata.defaultLanguage + ? contentData.metadata.defaultLanguage : 'en'; this.contentDocument.open(); - this.contentDocument.write('
' + H5P.getHeadTags(contentId) + ''); + this.contentDocument.write('' + H5P.getHeadTags(contentId) + ''); this.contentDocument.close(); }); };