[wp-trac] [WordPress Trac] #42396: question about wp_kses - is that correct?
WordPress Trac
noreply at wordpress.org
Wed Nov 1 10:01:12 UTC 2017
#42396: question about wp_kses - is that correct?
--------------------------+------------------------------
Reporter: tazotodua | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: close | Focuses:
--------------------------+------------------------------
Changes (by swissspidy):
* keywords: => close
Comment:
> before the return, there are variables, which are not used anywhere
inside that function, is that correct?
No.
{{{
global $pass_allowed_html, $pass_allowed_protocols;
$pass_allowed_html = $allowed_html;
$pass_allowed_protocols = $allowed_protocols;
}}}
This means the two global variables are overridden by the function
arguments. `_wp_kses_split_callback` uses these globals after that.
> doesn't that make an infinite loop?
No. `wp_kses()` might get called multiple times, that's called recursion.
That doesn't automatically make it an infinite loop though.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42396#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list