Skip to content

Remove validation handling options with the checkbox to disable auto-accepting sanitization #3350

@schlessera

Description

@schlessera

For the vast majority of users the option to auto-accept validation errors should be enabled:

image

This option is in fact enabled by default. Based on usage over the past year it seems this option is rarely unchecked, and in fact it is not even able to be unchecked when in Standard mode:

image

Therefore the checkbox option should be removed entirely.

As part of this, the notices that appear in the validated URLs screen should be removed:

image

image

Note that in #3346 (fixing #2326) the excessive_css validation error actually defaults to auto-rejected when the site is in Standard mode. To extend this now to give control over a site's developers to have control over the default behavior, the AMP_Validation_Manager::is_sanitization_auto_accepted() method should be made filterable. This will then allow for the removal of the checkbox and removal of the 'auto_accept_sanitization' option.

Context: For almost all users, accepting sanitization by default just makes sense, so going by the "decisions, not options" mantra of WordPress and removing the option seems sensible. See #3346 (comment)

This is related to #2346 which removed the checkbox for showing the admin bar in AMP pages. It reverts the admin notices added in #1376.


Whether a new validation error is sanitized by default is filterable via amp_validation_error_default_sanitized. For example: https://gist.github.com/westonruter/c1496d668b2a73a44aa423e6547a59b7.

Metadata

Metadata

Assignees

Labels

EnhancementNew feature or improvement of an existing oneSanitizers

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions