From 3bf1f7763bb30a30f8fffda8fdbeaf1c27bad40a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 16 Mar 2021 12:51:45 +0100 Subject: [PATCH] MOBILE-3635 resource: Allow IFRAME to use XHTML --- src/addons/mod/resource/services/resource-helper.ts | 2 +- src/core/services/utils/iframe.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/addons/mod/resource/services/resource-helper.ts b/src/addons/mod/resource/services/resource-helper.ts index 33c37bfe7..48d170947 100644 --- a/src/addons/mod/resource/services/resource-helper.ts +++ b/src/addons/mod/resource/services/resource-helper.ts @@ -133,7 +133,7 @@ export class AddonModResourceHelperProvider { return false; } - return mimetype == 'text/html'; + return mimetype == 'text/html' || mimetype == 'application/xhtml+xml'; } /** diff --git a/src/core/services/utils/iframe.ts b/src/core/services/utils/iframe.ts index f14a84b34..064f24380 100644 --- a/src/core/services/utils/iframe.ts +++ b/src/core/services/utils/iframe.ts @@ -340,7 +340,7 @@ export class CoreIframeUtilsProvider { // Find the link being clicked. let el: Element | null = event.target as Element; - while (el && el.tagName !== 'A') { + while (el && el.tagName !== 'A' && el.tagName !== 'a') { el = el.parentElement; }