Skip to content

CSP: Avoid using unsafe-inline scripts in dom onClick attributes #46304

@runephilosof-abtion

Description

@runephilosof-abtion

Please move this onClick script to a script tag.

$node['meta']['onclick'] = 'window.open( this.href ); return false;';

When wp_add_inline_script is used instead, I can hook into it and add a nonce to it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions