Skip to content

Commit

Permalink
Include nonce for inline script if applicable (#786)
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair3149 committed Nov 22, 2023
1 parent 570b7a0 commit 6e62a00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ResourceFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace SRF;

use Html;
use RequestContext;
use SMWOutputs as ResourceManager;
use SMWQueryResult as QueryResult;
use SMW\Query\PrintRequest;
Expand Down Expand Up @@ -70,7 +71,7 @@ public static function encode( $id, $data ) {
$id => json_encode( $data )
]
),
false
RequestContext::getMain()->getOutput()->getCSP()->getNonce()
)
);
}
Expand Down

0 comments on commit 6e62a00

Please sign in to comment.