[NSFW] Security Error in CF7

[ad_1]

Error Type : WordPress.Security.EscapeOutput.OutputNotEscaped
File : \wp-content\plugins\contact-form-7\admin\edit-contact-form.php
Line : Getting error in line 152
Error Message : All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found ‘”onclick=\”this.form._wpnonce.value = ‘$copy_nonce’; this.form.action.value = ‘copy’; return true;\””‘.

Here’s an example of how you might fix the code:

$copy_nonce = wp_create_nonce('wpcf7-copy-contact-form_' . $post_id);
$onclick_attr = sprintf(
"this.form._wpnonce.value="%s"; this.form.action.value="copy"; return true;",
esc_js($copy_nonce)
);
echo ' onclick="' . esc_attr($onclick_attr) . '"';

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer