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

Recommendation: Escaping Translated Strings #29

Closed
sakinshrestha opened this issue Jan 29, 2018 · 3 comments
Closed

Recommendation: Escaping Translated Strings #29

sakinshrestha opened this issue Jan 29, 2018 · 3 comments

Comments

@sakinshrestha
Copy link

  • All translation functions must be escaped as sometimes an improper translation may break the html.
  • E.g:
    • Almost all instances of __()/_e() need to be esc_html__()/esc_html_e()
      • 404.php line 17 becomes
        <h1 class="entry-title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'memberlite' ); ?></h1>
    • esc_attr__() where used as attribute values
    • pass via wp_kses() if some html elements are required
  • Check all files as there are a lot of these unescaped translation functions
@pbrocks
Copy link
Contributor

pbrocks commented Jul 18, 2018

Root files addres in PR

@pbrocks
Copy link
Contributor

pbrocks commented Jul 18, 2018

Balance addressed here PR

@ideadude
Copy link
Member

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants