wordpress-sdk icon indicating copy to clipboard operation
wordpress-sdk copied to clipboard

Submit theme warning - replace esc_attr with esc_html

Open dgwyer opened this issue 5 years ago • 2 comments

🐞 bug report

Behavior:

  • What is the issue? (*) When uploading themes to wordpress.org the following warning is triggered:

freemius-theme-submit-esc-attr

  • What is the expected behavior? The specified line of code in the SDK needs esc_attr replacing with esc_html.

https://github.com/Freemius/wordpress-sdk/blob/master/templates/forms/subscription-cancellation.php#L136

Versions: (*)

  • Freemius SDK Version: 2.3.2
  • WordPress Version: 5.2
  • PHP Version: 7.0

dgwyer avatar Jun 27 '20 09:06 dgwyer

This is an easy fix as esc_attr and esc_html are almost identical: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/formatting.php#L4449

I can take this one.

dgwyer avatar Jun 27 '20 09:06 dgwyer

While testing with theme checker there is not error or warning. Now that I submitted in wp org it failed. Here is the error that I got.

Screenshot from 2020-06-29 11-38-41

amitbajracharya avatar Jun 29 '20 06:06 amitbajracharya