Make WordPress Core

Opened 7 weeks ago

Last modified 7 weeks ago

#62721 new defect (bug)

strip_tags() is discouraged. Use the more comprehensive wp_strip_all_tags() instead.

Reported by: pitamdey's profile pitamdey Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Themes Keywords: close 2nd-opinion
Focuses: coding-standards Cc:

Description

There is a PHPCS error i.e.
strip_tags() is discouraged. Use the more comprehensive wp_strip_all_tags() instead.

Attachments (2)

phpcsfix.patch (275.5 KB) - added by pitamdey 7 weeks ago.
Patch for this issue
updated.patch (276.3 KB) - added by pitamdey 7 weeks ago.
Updated Patch

Download all attachments as: .zip

Change History (4)

@pitamdey
7 weeks ago

Patch for this issue

@pitamdey
7 weeks ago

Updated Patch

#1 @karmatosed
7 weeks ago

  • Component changed from Bundled Theme to Themes
  • Keywords needs-testing added

Thank you for the patch, however this feels like it's not for bundled themes as not on a theme specifically. Patches for bundled themes are meant to be specific to a theme and in your patch I do see for example wider fixes. This is absolutely ok but I am going to mark this for wider review.

If you could provide steps for testing and anything you found in testing that would also be great to ease those coming to this ticket, thank you.

#2 @sabernhardt
7 weeks ago

  • Keywords close 2nd-opinion added; has-patch needs-testing removed

#57579 already covers the broader scope of replacing most strip_tags() calls.

However, this ticket might be worth keeping open separately if it focuses on the calls within the bundled themes' image attachment templates and/or ephemera widget classes.

Note: See TracTickets for help on using tickets.