[wp-trac] [WordPress Trac] #39941: Allow using Content-Security-Policy without unsafe-inline

WordPress Trac noreply at wordpress.org
Tue Oct 20 14:34:53 UTC 2020


#39941: Allow using Content-Security-Policy without unsafe-inline
-------------------------------------------------+-------------------------
 Reporter:  tomdxw                               |       Owner:  (none)
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Security                             |     Version:  4.8
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests dev-        |     Focuses:  javascript
  feedback                                       |
-------------------------------------------------+-------------------------

Comment (by adamsilverstein):

 [attachment:"39941.diff"] Includes only the new API for adding CSP enabled
 script tags, plus related tests.

 * `wp_print_script_tag` and `wp_get_script_tag`: for script tags that load
 JavaScript files through the src attribute;
 * `wp_print_inline_script_tag` and `wp_get_inline_script_tag`: for inline
 scripts.

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


More information about the wp-trac mailing list