Skip to content

Commit 5c0ead3

Browse files
authored
docs(config): update innerHTML comments (#27032)
1 parent ae48282 commit 5c0ead3

File tree

7 files changed

+33
-33
lines changed

7 files changed

+33
-33
lines changed

core/src/components.d.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ export namespace Components {
272272
*/
273273
"leaveAnimation"?: AnimationBuilder;
274274
/**
275-
* 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 `<Ionic>` would become `&lt;Ionic&gt;` 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.
275+
* 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 `<Ionic>` would become `&lt;Ionic&gt;` 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.
276276
*/
277277
"message"?: string | IonicSafeString;
278278
/**
@@ -1135,7 +1135,7 @@ export namespace Components {
11351135
*/
11361136
"loadingSpinner"?: SpinnerTypes | null;
11371137
/**
1138-
* 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 `<Ionic>` would become `&lt;Ionic&gt;` 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.
1138+
* 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 `<Ionic>` would become `&lt;Ionic&gt;` 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.
11391139
*/
11401140
"loadingText"?: string | IonicSafeString;
11411141
}
@@ -1554,7 +1554,7 @@ export namespace Components {
15541554
*/
15551555
"leaveAnimation"?: AnimationBuilder;
15561556
/**
1557-
* 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.
1557+
* 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.
15581558
*/
15591559
"message"?: string | IonicSafeString;
15601560
/**
@@ -2382,15 +2382,15 @@ export namespace Components {
23822382
*/
23832383
"pullingIcon"?: SpinnerTypes | string | null;
23842384
/**
2385-
* 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 `<Ionic>` would become `&lt;Ionic&gt;` 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.
2385+
* 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 `<Ionic>` would become `&lt;Ionic&gt;` 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.
23862386
*/
23872387
"pullingText"?: string | IonicSafeString;
23882388
/**
23892389
* An animated SVG spinner that shows when refreshing begins
23902390
*/
23912391
"refreshingSpinner"?: SpinnerTypes | null;
23922392
/**
2393-
* 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 `<Ionic>` would become `&lt;Ionic&gt;` 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.
2393+
* 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 `<Ionic>` would become `&lt;Ionic&gt;` 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.
23942394
*/
23952395
"refreshingText"?: string | IonicSafeString;
23962396
}
@@ -3118,7 +3118,7 @@ export namespace Components {
31183118
*/
31193119
"leaveAnimation"?: AnimationBuilder;
31203120
/**
3121-
* 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.
3121+
* 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.
31223122
*/
31233123
"message"?: string | IonicSafeString;
31243124
/**
@@ -4235,7 +4235,7 @@ declare namespace LocalJSX {
42354235
*/
42364236
"leaveAnimation"?: AnimationBuilder;
42374237
/**
4238-
* 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 `<Ionic>` would become `&lt;Ionic&gt;` 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.
4238+
* 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 `<Ionic>` would become `&lt;Ionic&gt;` 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.
42394239
*/
42404240
"message"?: string | IonicSafeString;
42414241
/**
@@ -5169,7 +5169,7 @@ declare namespace LocalJSX {
51695169
*/
51705170
"loadingSpinner"?: SpinnerTypes | null;
51715171
/**
5172-
* 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 `<Ionic>` would become `&lt;Ionic&gt;` 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.
5172+
* 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 `<Ionic>` would become `&lt;Ionic&gt;` 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.
51735173
*/
51745174
"loadingText"?: string | IonicSafeString;
51755175
}
@@ -5584,7 +5584,7 @@ declare namespace LocalJSX {
55845584
*/
55855585
"leaveAnimation"?: AnimationBuilder;
55865586
/**
5587-
* 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.
5587+
* 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.
55885588
*/
55895589
"message"?: string | IonicSafeString;
55905590
/**
@@ -6421,15 +6421,15 @@ declare namespace LocalJSX {
64216421
*/
64226422
"pullingIcon"?: SpinnerTypes | string | null;
64236423
/**
6424-
* 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 `<Ionic>` would become `&lt;Ionic&gt;` 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.
6424+
* 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 `<Ionic>` would become `&lt;Ionic&gt;` 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.
64256425
*/
64266426
"pullingText"?: string | IonicSafeString;
64276427
/**
64286428
* An animated SVG spinner that shows when refreshing begins
64296429
*/
64306430
"refreshingSpinner"?: SpinnerTypes | null;
64316431
/**
6432-
* 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 `<Ionic>` would become `&lt;Ionic&gt;` 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.
6432+
* 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 `<Ionic>` would become `&lt;Ionic&gt;` 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.
64336433
*/
64346434
"refreshingText"?: string | IonicSafeString;
64356435
}
@@ -7214,7 +7214,7 @@ declare namespace LocalJSX {
72147214
*/
72157215
"leaveAnimation"?: AnimationBuilder;
72167216
/**
7217-
* 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.
7217+
* 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.
72187218
*/
72197219
"message"?: string | IonicSafeString;
72207220
/**

core/src/components/alert/alert.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ export class Alert implements ComponentInterface, OverlayInterface {
109109
* For more information: [Security Documentation](https://ionicframework.com/docs/faq/security)
110110
*
111111
* This property accepts custom HTML as a string.
112-
* Developers who only want to pass plain text
113-
* can disable the custom HTML functionality
114-
* by setting `innerHTMLTemplatesEnabled: false` in the Ionic config.
112+
* Content is parsed as plaintext by default.
113+
* `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config
114+
* before custom HTML can be used.
115115
*/
116116
@Prop() message?: string | IonicSafeString;
117117

core/src/components/infinite-scroll-content/infinite-scroll-content.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ export class InfiniteScrollContent implements ComponentInterface {
3333
* For more information: [Security Documentation](https://ionicframework.com/docs/faq/security)
3434
*
3535
* This property accepts custom HTML as a string.
36-
* Developers who only want to pass plain text
37-
* can disable the custom HTML functionality
38-
* by setting `innerHTMLTemplatesEnabled: false` in the Ionic config.
36+
* Content is parsed as plaintext by default.
37+
* `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config
38+
* before custom HTML can be used.
3939
*/
4040
@Prop() loadingText?: string | IonicSafeString;
4141

core/src/components/loading/loading.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ export class Loading implements ComponentInterface, OverlayInterface {
7979
* Optional text content to display in the loading indicator.
8080
*
8181
* This property accepts custom HTML as a string.
82-
* Developers who only want to pass plain text
83-
* can disable the custom HTML functionality
84-
* by setting `innerHTMLTemplatesEnabled: false` in the Ionic config.
82+
* Content is parsed as plaintext by default.
83+
* `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config
84+
* before custom HTML can be used.
8585
*/
8686
@Prop() message?: string | IonicSafeString;
8787

core/src/components/refresher-content/refresher-content.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ export class RefresherContent implements ComponentInterface {
3535
*
3636
* For more information: [Security Documentation](https://ionicframework.com/docs/faq/security)
3737
*
38-
* This property accepts custom HTML as a string.
39-
* Developers who only want to pass plain text
40-
* can disable the custom HTML functionality
41-
* by setting `innerHTMLTemplatesEnabled: false` in the Ionic config.
38+
* Content is parsed as plaintext by default.
39+
* `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config
40+
* before custom HTML can be used.
4241
*/
4342
@Prop() pullingText?: string | IonicSafeString;
4443

@@ -56,10 +55,9 @@ export class RefresherContent implements ComponentInterface {
5655
*
5756
* For more information: [Security Documentation](https://ionicframework.com/docs/faq/security)
5857
*
59-
* This property accepts custom HTML as a string.
60-
* Developers who only want to pass plain text
61-
* can disable the custom HTML functionality
62-
* by setting `innerHTMLTemplatesEnabled: false` in the Ionic config.
58+
* Content is parsed as plaintext by default.
59+
* `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config
60+
* before custom HTML can be used.
6361
*/
6462
@Prop() refreshingText?: string | IonicSafeString;
6563

core/src/components/toast/toast.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ export class Toast implements ComponentInterface, OverlayInterface {
114114
/**
115115
* Message to be shown in the toast.
116116
* This property accepts custom HTML as a string.
117-
* Developers who only want to pass plain text
118-
* can disable the custom HTML functionality
119-
* by setting `innerHTMLTemplatesEnabled: false` in the Ionic config.
117+
* Content is parsed as plaintext by default.
118+
* `innerHTMLTemplatesEnabled` must be set to `true` in the Ionic config
119+
* before custom HTML can be used.
120120
*/
121121
@Prop() message?: string | IonicSafeString;
122122

core/src/utils/config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ export interface IonicConfig {
193193
* Relevant Components: ion-alert, ion-infinite-scroll-content, ion-loading, ion-refresher-content, ion-toast
194194
* If `false`, all `innerHTML` usage will be disabled in Ionic, and
195195
* custom HTML will not be usable in the relevant components.
196-
* `innerHTML` usage is enabled by default.
196+
* If `true`, all `innerHTML` usage will be enabled in Ionic, and
197+
* custom HTML will be usable in the relevant components.
198+
* `innerHTML` usage is disabled by default.
197199
*/
198200
innerHTMLTemplatesEnabled?: boolean;
199201

0 commit comments

Comments
 (0)