Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #56655, comment 7


Ignore:
Timestamp:
11/04/2022 05:18:53 PM (4 years ago)
Author:
azaozz

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #56655, comment 7

    v1 v2  
    1313Not sure that is a good idea. KSES is pretty slow and is intended only for use when **user supplied content** is saved to the DB. All other uses of it, especially on outputting/displaying content, make WP slow.
    1414
    15 For example: if a plugin would allow a user to enter a menu title, it should use KSES on saving the title entered by the user to make sue it is safe. This is the same for any other user input.
     15For example: if a plugin would allow a user to enter a menu title, it should use KSES on saving the title entered by the user to make sue it is safe if it wanted to allow users to enter HTML tags at all. Usually a plugin would use `sanitize_text_field()` to remove tags and make the text "safe". This is the same for any other user input.