[wp-trac] [WordPress Trac] #56433: invalid regex used in preg_replace

WordPress Trac noreply at wordpress.org
Wed Aug 24 20:53:40 UTC 2022


#56433: invalid regex used in preg_replace
-------------------------------+------------------------------
 Reporter:  chocofc1           |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Formatting         |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:   => reporter-feedback


Comment:

 Hi there, welcome to WordPress Trac! Thanks for the ticket.

 That regex is in the `wp_strip_all_tags()` function, and its purpose is to
 remove all script and style tags from the passed string, including their
 content.

 There is a
 [https://core.trac.wordpress.org/browser/tags/6.0.1/tests/phpunit/tests/formatting/wpStripAllTags.php
 basic unit test for the function] to make sure it works as expected, and
 [https://github.com/WordPress/wordpress-
 develop/runs/7999773776?check_suite_focus=true it passes in the current
 builds]. Introduced in [27042] / #25507.

 Could you elaborate a bit more on what is the issue here? Does it still
 happen with all plugins disabled and a default theme (Twenty Twenty-Two)
 activated? Could you share the steps to reproduce it on a clean install?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56433#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list