Skip to content

Commit

Permalink
Merge pull request #15949 from primefaces/issue-15911
Browse files Browse the repository at this point in the history
Fixes #15911 - Table | Add csp nonce to responsive style element
  • Loading branch information
cetincakiroglu authored Jul 3, 2024
2 parents 20c2080 + 0be881f commit 2f480b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2988,7 +2988,8 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable
this.responsiveStyleElement = this.renderer.createElement('style');
this.responsiveStyleElement.type = 'text/css';
this.renderer.appendChild(this.document.head, this.responsiveStyleElement);

DomHandler.setAttribute(this.responsiveStyleElement, 'nonce', this.config?.csp()?.nonce);

let innerHTML = `
@media screen and (max-width: ${this.breakpoint}) {
#${this.id}-table > .p-datatable-thead > tr > th,
Expand Down

0 comments on commit 2f480b3

Please sign in to comment.