Your code is working correctly. If you look at the source code of the page, you will see:
<script>alert('Test')</script>
When the above text gets processed for display by your browser, it then becomes
<script>alert('Test')</script>
which is what you want to be displayed.
Related Posts:
- Data Validation: Always escape late / escape HTML Code
- Multiple register settings, with same option name – issue
- Best Practice for Validating and Sanitizing Data
- Data sanitization for user registration and user login
- What data sanitzation function should be used to store entire source code of webpage?
- Why the WP Core team does not allow filter_* functions? [closed]
- confused about sanitize_email after is_email [duplicate]
- How do I sanitize the str_replace function in javascript variables
- Validating input using java.util.Scanner
- What is the actual minimum length of an email address as defined by the IETF?
- In Which Contexts are Plugins Responsible for Data Validation/Sanitization?
- Sanitize and data validation with apply_filters() function
- How to properly validate data from $_GET or $_REQUEST using WordPress functions?
- is_email() VS sanitize_email()
- Server side validation
- Shortcode putting html such as
- How do I sanitize a javascript text?
- Does wp_insert_post validate the input?
- WordPress oEmbed W3C Validation
- How to Remove novalidate attribute from comment form
- What is wp_check_invalid_utf8?
- Data Validation
- Inconsistent server code response using HTTP API
- wordpress site validation errors
- vs WordPress Security
- Data validation
- Who is responsible for data sanitization in WordPress development?
- Settings API – sanitize_callback is not called and it leads to an incorrect behavior
- What is the proper way to validate and sanitize JSON response from REST API?
- Does balanceTags() provide any escaping / protection?
- w3c validation problem – Twitter share button pulling content
- wp_remote_post – handling responses
- Prevent invalid or empty values from being saved to the database and retain the form field values upon error
- Unable to sanitize in customizer and escape in theme without removing ability for user to use “< br >” to insert a line break
- protect user submitted posts
- Settings API – getting hidden input / submit button’s name
- Require user to input code from an array of allowed codes with Gravity Forms [closed]
- How WordPress sanitizes post content on save? Or it doesn’t?
- Safely store code(html/js..) into database
- WordPress live, custom text box validation, how to?
- How to do more than one verify_nonce in one function?
- W3C validation errors (trailing slashes)
- How to save Checkbox-Options in Plugin Options Page
- Data Validation & Sanitization for Big HTML Blocks
- Jquery Validation Engine with Conatct Form 7
- Form Sanitization and Validation
- Gravity Forms validate arrival and departure
- Why is my script’s regex having its backslash removed?
- Proper Way to Sanitize Meta Input
- Validation Always Tells There Is an Open DIV
- Settings api sanatize callback not being triggered
- How long does plugin review usually take?
- WP calendar summary attribute validation error
- How to use esc_attr__() function properly to translate a variable that contains string?
- oneOf two possible objects in WP REST API?
- how to sanitizing $_POST with the correct way?
- Simple way to alert error messages in Javascript
- How can I validate an email address using a regular expression?
- Good input validation loop using cin – C++
- How can I validate an email address using a regular expression?
- Reactjs – Form input validation
- How to validate an email address in JavaScript
- XAML Binding Groups
- “Stray start tag footer” in html validator?
- A potentially dangerous Request.Form value was detected from the client
- WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for jquery
- Email validation using jQuery
- How to test valid UUID/GUID?
- what is a parse error and how do I fix it
- Server-side schema validation with JAX-WS
- How to validate date with format “mm/dd/yyyy” in JavaScript?
- Validating IPv4 addresses with regexp
- what is a good method to sanitize the whole $_POST array in php?
- An invalid form control with name=” is not focusable
- Validate date in dd/mm/yyyy format using JQuery Validate
- How can I check if a string is a valid number?
- HTML5 Validation Error: body start tag seen but an element of the same type was already open
- How can I check if a single character appears in a string?
- What is jQuery Unobtrusive Validation?
- jQuery Form Validation before Ajax submit
- Contact Form 7 – Custom Validation
- How does the SQL injection from the “Bobby Tables” XKCD comic work?
- Hapi/Joi Validation: How to process text to a specific format
- What is the best Java email address validation method?
- Check if inputs are empty using jQuery
- ZIP Code (US Postal Code) validation
- A non well formed numeric value encountered
- validate textfield contents in wordpress simple job board plugin
- Is sanitize_title enough to generate post slugs?
- Remove type attribute from script and style tags added by WordPress
- wordpress sanitize array?
- Data sanitization: Best Practices with code examples
- Should I sanitize an email address before passing it to the is_email() function?
- don’t publish custom post type post if a meta data field isn’t valid
- How safe / sanitized is wp_insert_posts()?
- Should HTML output be passed through esc_html() AND wp_kses()?
- How to check if a string is a valid URL
- When to use esc_html and when to use sanitize_text_field?
- How to safely sanitize a textarea which takes full HTML input
- Escaping and sanitizing SVGs in metabox textarea