[wp-trac] [WordPress Trac] #45512: After WordPress 5.0 update js_escape is deprecated

WordPress Trac noreply at wordpress.org
Fri Dec 7 04:39:06 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             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------
Changes (by dd32):

 * keywords:   => reporter-feedback


Comment:

 Hey @adampatterson,

 I believe you'll find that one of your up-to-date plugins is calling
 `escape_js()`. The likely explanation is that it had some 5.0-only
 functionality built in ready for release, but since you weren't yet on 5.0
 it wasn't running that part of the code.

 `esc_js()` calls the `js_escape` ''filter'' but doesn't call the
 `escape_js()` ''function'' at all.

 You can use a plugin such as [https://en-au.wordpress.org/plugins/query-
 monitor/ Query Monitor] to debug what plugin is calling `js_escape()` and
 causing the deprecated notice.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45512#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list