The security risk here is not about the plain text but about translation. You should note that esc_html_e
is not only a function for escaping HTML but also for localization (l10n). I.e. other people can translate this String but you don’t know what the translation would be. It is possible that somebody translates the String and adds a link or some malicious HTML. Therefore it is better so escape HTML in this case.
Related Posts:
- Should I escape wordpress functions like the_title, the_excerpt, the_content
- From a security standpoint, should bloginfo() or get_bloginfo() be escaped?
- What is the difference between esc_html filter vs attribute_escape filter?
- What’s the difference between esc_* functions?
- What to use instead of wp_kses() in user output
- How to escape custom css?
- Do I need to use the esc_html() function on hard coded links?
- How Could I sanitize the receive data from this code
- Something is unescaping all html entities before output to browser [closed]
- Do we need to escape data that we receive from theme options?
- should I escape a literal url added in functions.php
- how to sanitizing $_POST with the correct way?
- How to redirect all HTTP requests to HTTPS
- What characters must be escaped in HTML 5?
- what is a auth_user_file.txt?
- Is moving wp-config outside the web root really beneficial?
- What’s the easiest way to stop WP from ever logging me out
- Prevent access or auto-delete readme.html, license.txt, wp-config-sample.php
- Which WP functions do you need to use esc_html() or esc_url() on?
- How to set up fail2ban with WordFence?
- Which KSES should be used and when?
- How to remove “Connection Information” requirement on localhost install of WP on MACOSX
- WordPress “Site Health Status” trust it or myself for its security advice?
- Stop wordpress automatically escaping $_POST data
- Will my WordPress site become vulnerable to Cross-Site Scripting (XSS) if I allow img tags in the comments area?
- Is WP vulnerable when updating plugins or themes?
- how can i embed wordpress backend in iframe
- Handling nonces for actions from guests to logged-in users
- Can I force a password change?
- How brute-forcer knows that the password is cracked for target username?
- wp_insert_post disable HTML filter
- What is pclzip.lib.php file that wordfence think it’s a malicious code
- Can someone (Support of my themeprovider) get access to my server If I send them my admin login?
- How to disable XML-RPC from Linux command-line in a total way?
- How to remove javascript malware in wordpress site [closed]
- Securing my WordPress Files and Directories
- Restricting access to content
- Single sign-on: wp_authenticate_user vs wp_authenticate
- How to allow internal links using wp_kses filtration
- How does Cross Site Scripting (XSS) work exactly? [closed]
- Relative security of different releases of WordPress
- How does the “authentication unique keys and salts” feature work?
- vs WordPress Security
- esc_html__ security : what for in this example?
- Should I always prefer esc_attr_e & esc_html_e instead of _e?
- Using HTACCESS for Secret Access
- wp-config.php being written by attacker
- Definitive wordpress directory ownership and permissions on linux
- XML-RPC errors they know my username?
- Is [admin / admin] acceptable for all local websites?
- Simple Online Payment for Event Registration [closed]
- What may be causing failure of auto-install features in WordPress (v3.0.3)?
- Client side HTTP parameter pollution (reflected)
- Local file inclusion critical security issue [closed]
- Malware script in database post table only? [closed]
- Best practices to assert current_user_can() with guests
- wordpress website host price and security [closed]
- XMLRPC slow and weird websites/services
- Is it safe to hand over the admin rights?
- how much information can we hide when using wordpress cms?
- How to find exploited wordpress plugin [closed]
- How I can open back door for myself?
- System setting changed by system user
- Does meta-data need to be sanitized?
- How can I force a specific password?
- Why would you use esc_attr() on internal functions?
- Are SVG image files safe to upload? Why WP defines them as a security risk? [duplicate]
- Who updates the wp-admin/core file?
- How to safely return the HTML?
- How WordPress sanitizes post content on save? Or it doesn’t?
- Does this code indicate an exploit?
- Checking for origin of a xmlrpc request
- wp-content – permissions for files/folders created by apache
- Has anyone developed a anti-spam plugin to simply allow users to BLOCK whatever they wish to, but one that will also go easy on IP addresses?
- User generated content and security
- Monitor wordpress all external calls
- HSTS header not being added correctly
- how to protect wordpress content from crawler
- Securing WordPress running on Azure platform
- Can WordPress admin user + database credentials be used to gain Cpanel or FTP access?
- Should I worry about SQL injection when using REST API?
- Spam Registrations
- Links to root domain from search engines don’t work, but direct links and links from other referrers do
- How can I backup my site if it gets hacked?
- How can I have more confidence that WP plugins aren’t getting and storing user data?
- Secure Multiple WordPress Installations on shared hosting
- Any way to disable /wp-login.php redirecting to the site folder?
- Able to go to WordPress admin even after deleting auth cookies from request headers
- Is WordPress ready for GDPR compliance? [closed]
- Should WordPress Add Options to Enhance Security or Leave it to plugin developers? [closed]
- Competitor is somehow accessing MetaData on a hidden WordPress site
- WordPress Hacks/Defacing [closed]
- Bank account number and Sort Code in a form [closed]
- Directory to store secure file
- How can I give someone server access to only duplicate and modify a site?
- WP-JSON: Cross Origin Resource Sharing Vulnerability?
- How can I implement ansible with per-host passwords, securely?
- Why should I firewall servers?
- Does drilling a hole into a hard drive suffice to make its data unrecoverable?
- Can you alter the default wordpress strong password requirements?