Opened 10 years ago
Closed 10 years ago
#37204 closed defect (bug) (invalid)
wp_strip_all_tags() function does not strip all tags
| Reported by: | aldemarcalazans | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Security | Version: | 4.4.3 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
If you apply the function wp_strip_all_tags() to the following strings, the result will be as follows:
<myname> ...................... '' (OK) <myname ....................... '' (OK) myname> ....................... myname> (BAD)
As you can see, if only one "greater than" character is placed on the right of the word, the function does not work.
Change History (1)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I'd say this works as intended.
mytag>is not a valid HTML tag, and shouldn't be stripped, just as5>4shouldn't be stripped or modified.wp_strip_all_tags()is designed to compliment PHP'sstrip_tags()functionality, but also strip the contents of<script>and<style>tags.