Skip to content

Bug: Does not pass strict content security policy #1027

@claytoncollie

Description

@claytoncollie

When a strict Content Security Policy is implemented without unsafe-inline and unsafe-eval for scripts and styles, the CaGov plugin is not able to load the following items due to how they are written to the page markup. In these cases, the CSS and HTML are loaded from inside a javascript file instead of enqueued/echoed with WordPress functions. For the CSS listed below, this goes all the way into the Design System packages that are imported into the WordPress plugin.

CSS

accordions
feedback
pagination

HTML

build/index.js as related to the PDF link icon web component. This HTML should not be written to the DOM during processing and not after script are loaded.

https://github.com/cagov/ca-design-system-gutenberg-blocks/blob/3fa11a492b836db411f82fffae56357c15bcf5a3/design-system-proposals/js/custom.js#L30

Metadata

Metadata

Assignees

No one assigned

    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