Skip to content

Automatic Whitelisting in sanitation functions #8

@acobster

Description

@acobster

While WordPress's security feature for automatically sanitizing HTML attrs and hooks is definitely a Good Thing, it's bitten us in the past, e.g. when trying to output custom data attrs from a woocommerce hook. The (tricky to find) solution was to explicitly whitelist the data attributes.

It'd be nice to automatically whitelist HTML attributes and tags for WordPress sanitation functions from Twig. Provide a Twig mechanism, such as a macro, that performs this whitelisting transparently from within Twig, so that we don't have to explicitly do this elsewhere in PHP.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions