1

I'm currently learning WordPress hooks and am delving into core to see what's happening in there. I noticed there are filters in wp-includes/default-filters.php with PHP comments about Kses. I wasn't sure what Kses meant until I found wp_kses in the Codex.

The notes on this page says:

KSES is a recursive acronym which stands for “KSES Strips Evil Scripts".

So then do I assume anything I find in core with either kses in the code or the PHP comments has to do with data sanitization? Just trying to understand general patterns in WordPress core. Thanks! :-)

0

... anything I find in core with either kses in the code or the PHP comments has to do with data sanitization?

It would have to do with the functions that sanitize data or with data that needs to be sanitized, yes. That is the primary reason for the KSES code, which, if you look it over, is pretty resource intensive. You wouldn't want to use it unnecessarily.

| improve this answer | |
  • Hmm, am I right to assume then from what I see in default-filters.php that wp_kses_data is mostly used in admin sanitization whereas wp_filter_kses is for front-end? – RachieVee Jul 8 '15 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.