8000 Should hardcoded strings and translations functions flagged? · Issue #30 · WordPress/wporg-code-analysis · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Should hardcoded strings and translations functions flagged? #30

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

Open
iandunn opened this issue Apr 2, 2021 · 0 comments
Open

Should hardcoded strings and translations functions flagged? #30

iandunn opened this issue Apr 2, 2021 · 0 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@iandunn
Copy link
Member
iandunn commented Apr 2, 2021

Currently WordPress.Security.EscapeOutput will flag hardcoded strings and translated string as warnings.

Is that too strict for this context, since we want to focus on the minimum repository standard?

Translated string

<p><?php _e( 'When two markers overlap, the marker with the higher stacking order will be on top. The Default is 0.', 'basic-google-maps-placemarks' ); ?></p>
 3 | WARNING | All output should be run through an escaping function (like
   |         | esc_html_e() or esc_attr_e()), found '_e'.
   |         | (WordPress.Security.EscapeOutput.UnsafePrintingFunction)

Hardcoded string

	<h2><?php printf( __( '%s Settings', 'basic-google-maps-placemarks' ), BGMP_NAME ); ?></h2>
  5 | WARNING | All output should be run through an escaping function (see the
    |         | Security sections in the WordPress Developer Handbooks), found
    |         | 'BGMP_NAME'.
    |         | (WordPress.Security.EscapeOutput.OutputNotEscaped)
@iandunn iandunn added enhancement New feature or request question Further information is requested labels Apr 2, 2021
@iandunn iandunn added this to the 1: Create Plugin Standard milestone Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant
0