-
Notifications
You must be signed in to change notification settings - Fork 18
Checkboxes Fix for SafeValue content #142
Checkboxes Fix for SafeValue content #142
Conversation
@@ -23,7 +23,7 @@ import { | |||
export class MarkdownComponent implements OnChanges, OnInit, AfterViewChecked { | |||
|
|||
@Input() fieldName: string = 'Description'; | |||
@Input('renderedText') inpRenderedText: string = ''; | |||
@Input('renderedText') inpRenderedText: any = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use SafeHtml
instead of any
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because is can be a string (if there is no need for sanitation anyway) or a SafeValue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then can you do it, string | SafeHtml
?
@@ -42,7 +42,7 @@ export class MarkdownComponent implements OnChanges, OnInit, AfterViewChecked { | |||
boxHeight: number; | |||
enableShowMore: boolean = false; | |||
// these need to be public for the tests accessing them. | |||
renderedText = ''; | |||
renderedText: any = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use SafeHtml
instead of any
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, coulbe be string or SafeValue. In fact, it will in most cases be just string. Only when someone wants to use extended HTML, he needs to wrap it in SafeValue. This way we give the user the option to either use it with sanitized HTML or with non-sanitized HTML.
@@ -23,7 +23,7 @@ import { | |||
export class MarkdownComponent implements OnChanges, OnInit, AfterViewChecked { | |||
|
|||
@Input() fieldName: string = 'Description'; | |||
@Input('renderedText') inpRenderedText: string = ''; | |||
@Input('renderedText') inpRenderedText: any = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then can you do it, string | SafeHtml
?
This fixes an issue with SafeValue content not correctly displayed in Markdown rendered fields.