wp_kses_decode_entities() calls create_function() each time called
|Reported by:||mdawaffe||Owned by:|
Every time wp_kses_decode_entities() is called, create_function() is called twice.
wp_kses_decode_entities() is called at least once in most KSES calls and once in all clean_url() calls. This can result in hundreds of create_function()s on normal pages and thousands on edge pages.
All these create_function()s eat up memory, which can, in edge cases, cause a fatal memory allocation error.
Since these create_function() calls are not used to generate actual dynamic code, there's no reason they cannot be replaced with hardcoded functions.