Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unescaped translations are not flagged by 'HM' standards #273

Open
sambulance opened this issue Jan 31, 2022 · 0 comments
Open

Unescaped translations are not flagged by 'HM' standards #273

sambulance opened this issue Jan 31, 2022 · 0 comments
Labels

Comments

@sambulance
Copy link
Member

Unescaped output from WordPress translation functions is not being flagged by the full HM standards checks.

The HM-Minimum standard allows the use of unescaped translation functions (see HM-Minimum/ruleset.xml#L57-L66). The minimum standards are then imported into HM standards (HM/ruleset.xml#L12-L13), but there are no other rules in the HM standard that check the output of these functions is escaped.

The following code should pass HM-Minimum, but fail HM. Currently, it passes both.

echo __( 'This should error', 'err' );
@ntwb ntwb added the phpcs label Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants