From ef1883fdcfb5ce1db554f58f65b5d47db60dceda Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 27 Mar 2023 13:34:01 -0400 Subject: [PATCH 1/2] Update config.ts --- core/src/utils/config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/utils/config.ts b/core/src/utils/config.ts index a4de594271f..4cf3cc08d0e 100644 --- a/core/src/utils/config.ts +++ b/core/src/utils/config.ts @@ -193,7 +193,9 @@ export interface IonicConfig { * Relevant Components: ion-alert, ion-infinite-scroll-content, ion-loading, ion-refresher-content, ion-toast * If `false`, all `innerHTML` usage will be disabled in Ionic, and * custom HTML will not be usable in the relevant components. - * `innerHTML` usage is enabled by default. + * If `true`, all `innerHTML` usage will be enabled in Ionic, and + * custom HTML will be usable in the relevant components. + * `innerHTML` usage is disabled by default. */ innerHTMLTemplatesEnabled?: boolean; From 53c8df3d99750173bb2e09b2fdab214389b25759 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 27 Mar 2023 17:39:36 +0000 Subject: [PATCH 2/2] chore(): update docs --- core/src/components.d.ts | 24 +++++++++---------- core/src/components/alert/alert.tsx | 6 ++--- .../infinite-scroll-content.tsx | 6 ++--- core/src/components/loading/loading.tsx | 6 ++--- .../refresher-content/refresher-content.tsx | 14 +++++------ core/src/components/toast/toast.tsx | 6 ++--- 6 files changed, 30 insertions(+), 32 deletions(-) diff --git a/core/src/components.d.ts b/core/src/components.d.ts index 532af08408c..b0481584cbf 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -272,7 +272,7 @@ export namespace Components { */ "leaveAnimation"?: AnimationBuilder; /** - * The main message to be displayed in the alert. `message` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) This property accepts custom HTML as a string. Developers who only want to pass plain text can disable the custom HTML functionality by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * The main message to be displayed in the alert. `message` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) This property accepts custom HTML as a string. Content is parsed as plaintext by default. `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config before custom HTML can be used. */ "message"?: string | IonicSafeString; /** @@ -1135,7 +1135,7 @@ export namespace Components { */ "loadingSpinner"?: SpinnerTypes | null; /** - * Optional text to display while loading. `loadingText` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) This property accepts custom HTML as a string. Developers who only want to pass plain text can disable the custom HTML functionality by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * Optional text to display while loading. `loadingText` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) This property accepts custom HTML as a string. Content is parsed as plaintext by default. `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config before custom HTML can be used. */ "loadingText"?: string | IonicSafeString; } @@ -1554,7 +1554,7 @@ export namespace Components { */ "leaveAnimation"?: AnimationBuilder; /** - * Optional text content to display in the loading indicator. This property accepts custom HTML as a string. Developers who only want to pass plain text can disable the custom HTML functionality by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * Optional text content to display in the loading indicator. This property accepts custom HTML as a string. Content is parsed as plaintext by default. `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config before custom HTML can be used. */ "message"?: string | IonicSafeString; /** @@ -2382,7 +2382,7 @@ export namespace Components { */ "pullingIcon"?: SpinnerTypes | string | null; /** - * The text you want to display when you begin to pull down. `pullingText` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) This property accepts custom HTML as a string. Developers who only want to pass plain text can disable the custom HTML functionality by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * The text you want to display when you begin to pull down. `pullingText` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) Content is parsed as plaintext by default. `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config before custom HTML can be used. */ "pullingText"?: string | IonicSafeString; /** @@ -2390,7 +2390,7 @@ export namespace Components { */ "refreshingSpinner"?: SpinnerTypes | null; /** - * The text you want to display when performing a refresh. `refreshingText` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) This property accepts custom HTML as a string. Developers who only want to pass plain text can disable the custom HTML functionality by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * The text you want to display when performing a refresh. `refreshingText` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) Content is parsed as plaintext by default. `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config before custom HTML can be used. */ "refreshingText"?: string | IonicSafeString; } @@ -3118,7 +3118,7 @@ export namespace Components { */ "leaveAnimation"?: AnimationBuilder; /** - * Message to be shown in the toast. This property accepts custom HTML as a string. Developers who only want to pass plain text can disable the custom HTML functionality by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * Message to be shown in the toast. This property accepts custom HTML as a string. Content is parsed as plaintext by default. `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config before custom HTML can be used. */ "message"?: string | IonicSafeString; /** @@ -4235,7 +4235,7 @@ declare namespace LocalJSX { */ "leaveAnimation"?: AnimationBuilder; /** - * The main message to be displayed in the alert. `message` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) This property accepts custom HTML as a string. Developers who only want to pass plain text can disable the custom HTML functionality by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * The main message to be displayed in the alert. `message` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) This property accepts custom HTML as a string. Content is parsed as plaintext by default. `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config before custom HTML can be used. */ "message"?: string | IonicSafeString; /** @@ -5169,7 +5169,7 @@ declare namespace LocalJSX { */ "loadingSpinner"?: SpinnerTypes | null; /** - * Optional text to display while loading. `loadingText` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) This property accepts custom HTML as a string. Developers who only want to pass plain text can disable the custom HTML functionality by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * Optional text to display while loading. `loadingText` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) This property accepts custom HTML as a string. Content is parsed as plaintext by default. `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config before custom HTML can be used. */ "loadingText"?: string | IonicSafeString; } @@ -5584,7 +5584,7 @@ declare namespace LocalJSX { */ "leaveAnimation"?: AnimationBuilder; /** - * Optional text content to display in the loading indicator. This property accepts custom HTML as a string. Developers who only want to pass plain text can disable the custom HTML functionality by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * Optional text content to display in the loading indicator. This property accepts custom HTML as a string. Content is parsed as plaintext by default. `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config before custom HTML can be used. */ "message"?: string | IonicSafeString; /** @@ -6421,7 +6421,7 @@ declare namespace LocalJSX { */ "pullingIcon"?: SpinnerTypes | string | null; /** - * The text you want to display when you begin to pull down. `pullingText` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) This property accepts custom HTML as a string. Developers who only want to pass plain text can disable the custom HTML functionality by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * The text you want to display when you begin to pull down. `pullingText` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) Content is parsed as plaintext by default. `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config before custom HTML can be used. */ "pullingText"?: string | IonicSafeString; /** @@ -6429,7 +6429,7 @@ declare namespace LocalJSX { */ "refreshingSpinner"?: SpinnerTypes | null; /** - * The text you want to display when performing a refresh. `refreshingText` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) This property accepts custom HTML as a string. Developers who only want to pass plain text can disable the custom HTML functionality by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * The text you want to display when performing a refresh. `refreshingText` can accept either plaintext or HTML as a string. To display characters normally reserved for HTML, they must be escaped. For example `` would become `<Ionic>` For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) Content is parsed as plaintext by default. `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config before custom HTML can be used. */ "refreshingText"?: string | IonicSafeString; } @@ -7214,7 +7214,7 @@ declare namespace LocalJSX { */ "leaveAnimation"?: AnimationBuilder; /** - * Message to be shown in the toast. This property accepts custom HTML as a string. Developers who only want to pass plain text can disable the custom HTML functionality by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * Message to be shown in the toast. This property accepts custom HTML as a string. Content is parsed as plaintext by default. `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config before custom HTML can be used. */ "message"?: string | IonicSafeString; /** diff --git a/core/src/components/alert/alert.tsx b/core/src/components/alert/alert.tsx index 6330446dcba..1efcafbbb64 100644 --- a/core/src/components/alert/alert.tsx +++ b/core/src/components/alert/alert.tsx @@ -109,9 +109,9 @@ export class Alert implements ComponentInterface, OverlayInterface { * For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) * * This property accepts custom HTML as a string. - * Developers who only want to pass plain text - * can disable the custom HTML functionality - * by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * Content is parsed as plaintext by default. + * `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config + * before custom HTML can be used. */ @Prop() message?: string | IonicSafeString; diff --git a/core/src/components/infinite-scroll-content/infinite-scroll-content.tsx b/core/src/components/infinite-scroll-content/infinite-scroll-content.tsx index 34e51aced51..747d6fab63a 100644 --- a/core/src/components/infinite-scroll-content/infinite-scroll-content.tsx +++ b/core/src/components/infinite-scroll-content/infinite-scroll-content.tsx @@ -33,9 +33,9 @@ export class InfiniteScrollContent implements ComponentInterface { * For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) * * This property accepts custom HTML as a string. - * Developers who only want to pass plain text - * can disable the custom HTML functionality - * by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * Content is parsed as plaintext by default. + * `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config + * before custom HTML can be used. */ @Prop() loadingText?: string | IonicSafeString; diff --git a/core/src/components/loading/loading.tsx b/core/src/components/loading/loading.tsx index cf8ab545846..13cb5c5c19c 100644 --- a/core/src/components/loading/loading.tsx +++ b/core/src/components/loading/loading.tsx @@ -79,9 +79,9 @@ export class Loading implements ComponentInterface, OverlayInterface { * Optional text content to display in the loading indicator. * * This property accepts custom HTML as a string. - * Developers who only want to pass plain text - * can disable the custom HTML functionality - * by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * Content is parsed as plaintext by default. + * `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config + * before custom HTML can be used. */ @Prop() message?: string | IonicSafeString; diff --git a/core/src/components/refresher-content/refresher-content.tsx b/core/src/components/refresher-content/refresher-content.tsx index 6bed4e27ab9..0ade928a7c6 100644 --- a/core/src/components/refresher-content/refresher-content.tsx +++ b/core/src/components/refresher-content/refresher-content.tsx @@ -35,10 +35,9 @@ export class RefresherContent implements ComponentInterface { * * For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) * - * This property accepts custom HTML as a string. - * Developers who only want to pass plain text - * can disable the custom HTML functionality - * by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * Content is parsed as plaintext by default. + * `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config + * before custom HTML can be used. */ @Prop() pullingText?: string | IonicSafeString; @@ -56,10 +55,9 @@ export class RefresherContent implements ComponentInterface { * * For more information: [Security Documentation](https://ionicframework.com/docs/faq/security) * - * This property accepts custom HTML as a string. - * Developers who only want to pass plain text - * can disable the custom HTML functionality - * by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * Content is parsed as plaintext by default. + * `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config + * before custom HTML can be used. */ @Prop() refreshingText?: string | IonicSafeString; diff --git a/core/src/components/toast/toast.tsx b/core/src/components/toast/toast.tsx index 0242d7bd385..64dc0060eac 100644 --- a/core/src/components/toast/toast.tsx +++ b/core/src/components/toast/toast.tsx @@ -114,9 +114,9 @@ export class Toast implements ComponentInterface, OverlayInterface { /** * Message to be shown in the toast. * This property accepts custom HTML as a string. - * Developers who only want to pass plain text - * can disable the custom HTML functionality - * by setting `innerHTMLTemplatesEnabled: false` in the Ionic config. + * Content is parsed as plaintext by default. + * `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config + * before custom HTML can be used. */ @Prop() message?: string | IonicSafeString;