Skip to content

Commit

Permalink
Merge pull request #16239 from primefaces/issue-16211
Browse files Browse the repository at this point in the history
Fixes #16211
  • Loading branch information
cetincakiroglu authored Aug 15, 2024
2 parents 38462d8 + d46c209 commit 809d27d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ import {
TableRowUnSelectEvent,
TableSelectAllChangeEvent
} from './table.interface';
import { DomSanitizer } from '@angular/platform-browser';

@Injectable()
export class TableService {
Expand Down Expand Up @@ -1175,7 +1176,8 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable
public cd: ChangeDetectorRef,
public filterService: FilterService,
public overlayService: OverlayService,
public config: PrimeNGConfig
public config: PrimeNGConfig,
private readonly domSanitizer: DomSanitizer
) {
this.window = this.document.defaultView as Window;
}
Expand Down Expand Up @@ -2690,7 +2692,7 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable
}
`;
});
this.renderer.setProperty(this.styleElement, 'textContent', innerHTML);
this.renderer.setProperty(this.styleElement, 'innerHTML', this.domSanitizer.bypassSecurityTrustStyle(innerHTML));
}

onRowDragStart(event: any, index: number) {
Expand Down Expand Up @@ -3041,7 +3043,7 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable
}
}
`;
this.renderer.setProperty(this.responsiveStyleElement, 'textContent', innerHTML);
this.renderer.setProperty(this.responsiveStyleElement, 'innerHTML', this.domSanitizer.bypassSecurityTrustStyle(innerHTML));
}
}
}
Expand Down

0 comments on commit 809d27d

Please sign in to comment.