diff --git a/src/addon/mod/resource/providers/helper.ts b/src/addon/mod/resource/providers/helper.ts index 62a00e511..c1566e931 100644 --- a/src/addon/mod/resource/providers/helper.ts +++ b/src/addon/mod/resource/providers/helper.ts @@ -142,7 +142,7 @@ export class AddonModResourceHelperProvider { mimetype = this.mimetypeUtils.getMimeType(ext); } - return mimetype == 'text/html'; + return mimetype == 'text/html' || mimetype == 'application/xhtml+xml'; } /** diff --git a/src/assets/js/iframe-treat-links.js b/src/assets/js/iframe-treat-links.js index 68f83571b..c585c96fe 100644 --- a/src/assets/js/iframe-treat-links.js +++ b/src/assets/js/iframe-treat-links.js @@ -49,7 +49,7 @@ // Find the link being clicked. var el = event.target; - while (el && el.tagName !== 'A') { + while (el && (el.tagName !== 'A' && el.tagName !== 'a')) { el = el.parentElement; } diff --git a/src/providers/utils/iframe.ts b/src/providers/utils/iframe.ts index 0fdc5af74..6a044b558 100644 --- a/src/providers/utils/iframe.ts +++ b/src/providers/utils/iframe.ts @@ -329,7 +329,7 @@ export class CoreIframeUtilsProvider { // Find the link being clicked. let el = event.target; - while (el && el.tagName !== 'A') { + while (el && el.tagName !== 'A' && el.tagName !== 'a') { el = el.parentElement; }