#62697 closed enhancement (duplicate)
Replace strip_tags() with wp_strip_all_tags() for improved security and consistency.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
strip_tags()
is being used, but it is discouraged in WordPress as it only removes HTML tags and does not account for potential inline scripts or other malicious content. It is recommended to use wp_strip_all_tags()
instead, as it provides a more comprehensive and secure way to sanitize input by stripping all tags and ensuring cleaner data.
This change improves code security and aligns with WordPress coding standards.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
"I am assigning this ticket to myself to replace the usage of
strip_tags()
withwp_strip_all_tags()
for better security and adherence to WordPress coding standards. I will review the code, make the necessary changes, and ensure compatibility."