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?
- SSL Error: unable to get local issuer certificate
- When you use ‘badidea’ or ‘thisisunsafe’ to bypass a Chrome certificate/HSTS error, does it only apply for the current site? [closed]
- When you use ‘badidea’ or ‘thisisunsafe’ to bypass a Chrome certificate/HSTS error, does it only apply for the current site? [closed]
- How to redirect all HTTP requests to HTTPS
- What is the difference between a cer, pvk, and pfx file?
- Uses for the ‘"’ entity in HTML
- How to solve “Kernel panic – not syncing – Attempted to kill init” — without erasing any user data
- What’s the best approach for generating a new API key?
- Is it possible to decrypt SHA1
- Simplest two-way encryption using PHP
- Why does the URL http://a/%%30%30 crash Google Chrome?
- What characters must be escaped in HTML 5?
- Why shouldn’t `'` be used to escape single quotes?
- What does it mean to escape a string?
- what is a auth_user_file.txt?
- When you use ‘badidea’ or ‘thisisunsafe’ to bypass a Chrome certificate/HSTS error, does it only apply for the current site?
- How does the SQL injection from the “Bobby Tables” XKCD comic work?
- Error `sec_error_revoked_certificate` when viewed in Firefox only
- How to view PHP on live site
- Convert .pfx to .cer
- how fix “this certificate cannot be verified up to a trusted certification authority”
- How do I escape ampersands in XML so they are rendered as entities in HTML?
- Can an attacker use inspect element harmfully?
- Where does Internet Explorer store saved passwords?
- How can bcrypt have built-in salts?
- Is moving wp-config outside the web root really beneficial?
- Hide the fact a site is using WordPress?
- Verifying that I have fully removed a WordPress hack?
- Infected Files – what to do [closed]
- Getting a List of Currently Available Roles on a WordPress Site?
- WordPress 4.7.1 REST API still exposing users
- Can I Prevent Enumeration of Usernames?
- Best way to eliminate xmlrpc.php?
- What’s the easiest way to stop WP from ever logging me out
- If a hacker changed the blog_charset to UTF-7 does that make WordPress vulnerable to further attacks?
- Why should I use the esc_url?
- Should I remove install.php and install-helper.php?
- Prevent access or auto-delete readme.html, license.txt, wp-config-sample.php
- How safe / sanitized is wp_insert_posts()?
- Why does WordPress need my private ssh key to update?
- When to use esc_html and when to use sanitize_text_field?
- Where to securely store API keys and passwords in WordPress?
- Are Nonces Useless?
- Why escape if the_content isnt?
- How to print translation supported text with HTML URL
- Why does WordPress have more than one salt?
- Why are passwords exportable as plain text in WordPress?
- What is the ideal setup to address security concerns?
- Will there be security updates for 3.1 once 3.2 is released?
- Which WP functions do you need to use esc_html() or esc_url() on?
- Full path disclosure on rss-functions.php
- How to set up fail2ban with WordFence?
- How do I technically prove that WordPress is secure?
- Are the default salts secure?
- is_email() VS sanitize_email()
- WordPress it’s cleaning a custom query_var to avoid sql injections?
- Which KSES should be used and when?
- Can someone explain the use cases of esc_html?
- Is there a way to force ssl on certain pages
- How do WordPress Nonces Work?
- Tips for finding SPAM links injected into the_content
- Subscribe to email for security fixes?
- How do translated, escaped strings (esc_attr) in Themes work?
- Close a wordpress blog – keep site as it is but prevent hacks
- Is WordPress vulnerable to the httpoxy?
- What is the purpose of having a token in cookies?
- How to remove “Connection Information” requirement on localhost install of WP on MACOSX
- Understanding SVG vulnerabilities in WordPress related to a specific fix
- How is password strength calculated?
- Moving wp-config.php: Can this be done after site launch?
- How to secure or disable the RSS feeds?
- Regular security checks – what steps should be included?
- What are the pros and cons of using a custom front-end to retrieve content from a WordPress back-end
- How can I easily verify a core or plugin update has not broken anything?
- Disable comment windows for all existing posts (pages/blogposts)
- WordPress “Site Health Status” trust it or myself for its security advice?
- Generate WordPress salt
- Prevent setup-config.php page from appearing when host blocks database
- Vanilla WordPress install, what can/should I put in disable_functions?
- Stop wordpress automatically escaping $_POST data
- Do Cookies Need to be Sanatized Before Being Saved?
- 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?
- Disable external access to REST API Endpoint
- Make password invalid once logged out of password-protected page
- wp.getUsersBlogs XMLRPC Brute Force Attack/Vulnerability
- How to get WordPress to save upload file beyond web root [closed]
- WordPress and Security