[wp-trac] [WordPress Trac] #45512: After WordPress 5.0 update js_escape is deprecated
WordPress Trac
noreply at wordpress.org
Fri Dec 7 04:30:51 UTC 2018
#45512: After WordPress 5.0 update js_escape is deprecated
---------------------------+-----------------------------
Reporter: adampatterson | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 5.0
Severity: normal | Keywords:
Focuses: |
---------------------------+-----------------------------
After upgrading to WordPress 5.0 locally, I get the following error.
{{{
Notice: js_escape is <strong>deprecated</strong> since version 2.8.0! Use
esc_js() instead. in /wp-includes/functions.php on line 3861
}}}
Looking at the core file I can clearly see that the function is still part
of formatting.php where esc_js calls apply_filters on js_escape which is
deprecated and recommends that I use esc_js.
https://github.com/WordPress/WordPress/blob/56c162fbc9867f923862f64f1b4570d885f1ff03
/wp-includes/formatting.php#L4272
https://github.com/WordPress/WordPress/blob/6fd8080e7ee7599b36d4528f72a8ced612130b8c
/wp-includes/deprecated.php#L2053
I don't know why I haven't experienced this before as it looks like to
code hasn't been changed in a long time.
My Plugins are up to date and many of them include esc_js such as Woo
Commerce and JetPack.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45512>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list