File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 85
85
$ report_url = 'https://csp-report-api.openjs-foundation.workers.dev/ ' ;
86
86
$ policy = array (
87
87
'default-src ' => "'self' " ,
88
- 'script-src ' => "'self' 'nonce- $ nonce' code.jquery.com " ,
89
88
// The nonce is here so inline scripts can be used in the theme
89
+ 'script-src ' => "'self' 'nonce- $ nonce' code.jquery.com " ,
90
90
'style-src ' => "'self' 'nonce- $ nonce' code.jquery.com " ,
91
91
// Allow style="" attributes in blog posts and markdown.
92
92
'style-src-attr ' => "'unsafe-inline' " ,
113
113
// and workers from blob: URLs
114
114
$ policy [ 'script-src ' ] = "'self' 'unsafe-inline' blob: code.jquery.com " ;
115
115
$ policy [ 'style-src ' ] = "'self' 'unsafe-inline' code.jquery.com " ;
116
+ } elseif ( get_option ( 'jquery_is_blog ' ) ) {
117
+ // Allow <style> in blog posts
118
+ $ policy [ 'style-src ' ] = "'self' 'unsafe-inline' code.jquery.com " ;
116
119
}
117
120
118
121
$ policy_string = '' ;
You can’t perform that action at this time.
0 commit comments