From a6cb5f218e6ce2dbe9ab251c4325b856eeffcf64 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 9 May 2019 16:03:38 -0400 Subject: [PATCH] fix(loading): allow html content (#18242) fixes #18135 --- core/src/components/loading/loading.tsx | 3 ++- core/src/components/loading/test/basic/e2e.ts | 8 ++++++++ core/src/components/loading/test/basic/index.html | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/core/src/components/loading/loading.tsx b/core/src/components/loading/loading.tsx index 7f3646440a..a26d7921e1 100644 --- a/core/src/components/loading/loading.tsx +++ b/core/src/components/loading/loading.tsx @@ -2,6 +2,7 @@ import { Component, ComponentInterface, Element, Event, EventEmitter, Listen, Me import { Animation, AnimationBuilder, Config, Mode, OverlayEventDetail, OverlayInterface, SpinnerTypes } from '../../interface'; import { BACKDROP, dismiss, eventMethod, present } from '../../utils/overlays'; +import { sanitizeDOMString } from '../../utils/sanitization'; import { getClassMap } from '../../utils/theme'; import { iosEnterAnimation } from './animations/ios.enter'; @@ -196,7 +197,7 @@ export class Loading implements ComponentInterface, OverlayInterface { )} - {this.message &&
{this.message}
} + {this.message &&
} ]; } diff --git a/core/src/components/loading/test/basic/e2e.ts b/core/src/components/loading/test/basic/e2e.ts index ec928d71d2..8ad75c7ffb 100644 --- a/core/src/components/loading/test/basic/e2e.ts +++ b/core/src/components/loading/test/basic/e2e.ts @@ -26,6 +26,10 @@ test('loading: backdrop standalone', async () => { await testLoading(DIRECTORY, '#backdrop-loading'); }); +test('loading: html content basic', async () => { + await testLoading(DIRECTORY, '#html-content-loading'); +}); + /** * RTL Tests */ @@ -53,3 +57,7 @@ test('loading:rtl: custom class basic', async () => { test('loading:rtl: backdrop standalone', async () => { await testLoading(DIRECTORY, '#backdrop-loading', true); }); + +test('loading:rtl: html content basic', async () => { + await testLoading(DIRECTORY, '#html-content-loading', true); +}); diff --git a/core/src/components/loading/test/basic/index.html b/core/src/components/loading/test/basic/index.html index 59410e2708..3f86ba7e00 100644 --- a/core/src/components/loading/test/basic/index.html +++ b/core/src/components/loading/test/basic/index.html @@ -28,6 +28,7 @@ Show Loading with translucent Show Loading with cssClass Show Backdrop Click Loading + Show Loading with HTML content @@ -82,6 +83,10 @@