File tree 3 files changed +3
-3
lines changed
src/app/modules/angular-slickgrid
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -562,7 +562,7 @@ export class SelectEditor implements Editor {
562
562
if ( isRenderHtmlEnabled ) {
563
563
// sanitize any unauthorized html tags like script and others
564
564
// for the remaining allowed tags we'll permit all attributes
565
- const sanitizedText = DOMPurify . sanitize ( optionText , sanitizedOptions ) ;
565
+ const sanitizedText = ( DOMPurify . sanitize ( optionText , sanitizedOptions ) || '' ) . toString ( ) ;
566
566
optionText = htmlEncode ( sanitizedText ) ;
567
567
}
568
568
Original file line number Diff line number Diff line change @@ -378,7 +378,7 @@ export class SelectFilter implements Filter {
378
378
if ( isRenderHtmlEnabled ) {
379
379
// sanitize any unauthorized html tags like script and others
380
380
// for the remaining allowed tags we'll permit all attributes
381
- const sanitizedText = DOMPurify . sanitize ( optionText , sanitizedOptions ) ;
381
+ const sanitizedText = ( DOMPurify . sanitize ( optionText , sanitizedOptions ) || '' ) . toString ( ) ;
382
382
optionText = htmlEncode ( sanitizedText ) ;
383
383
}
384
384
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ export function htmlDecode(encodedStr: string): string {
63
63
* Create a in-memory div, set it's inner text(which jQuery automatically encodes)
64
64
* then grab the encoded contents back out. The div never exists on the page.
65
65
*/
66
- export function htmlEncode ( inputValue : any ) : string {
66
+ export function htmlEncode ( inputValue : string ) : string {
67
67
const entityMap = {
68
68
'&' : '&' ,
69
69
'<' : '<' ,
You can’t perform that action at this time.
0 commit comments