duplicate-post icon indicating copy to clipboard operation
duplicate-post copied to clipboard

PHPCS Error: Wrong escaping function. HTML attributes should be escaped by esc_attr(), not by esc_html_e()

Open amooreTO opened this issue 3 years ago • 0 comments

When running a PHPCS scan, the following error is present:

Wrong escaping function. HTML attributes should be escaped by esc_attr(), not by esc_html_e() (WordPressVIPMinimum.Security.ProperEscapingFunction.htmlAttrNotByEscHTML).

For this line: https://github.com/Yoast/duplicate-post/blob/trunk/src/admin/views/options.php#L247

esc_attr_e should be used instead of esc_html_e

amooreTO avatar Jul 29 '22 17:07 amooreTO