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 8585 $ report_url = 'https://csp-report-api.openjs-foundation.workers.dev/ ' ;
8686 $ policy = array (
8787 'default-src ' => "'self' " ,
88- 'script-src ' => "'self' 'nonce- $ nonce' code.jquery.com " ,
8988 // The nonce is here so inline scripts can be used in the theme
89+ 'script-src ' => "'self' 'nonce- $ nonce' code.jquery.com " ,
9090 'style-src ' => "'self' 'nonce- $ nonce' code.jquery.com " ,
9191 // Allow style="" attributes in blog posts and markdown.
9292 'style-src-attr ' => "'unsafe-inline' " ,
113113 // and workers from blob: URLs
114114 $ policy [ 'script-src ' ] = "'self' 'unsafe-inline' blob: code.jquery.com " ;
115115 $ 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 " ;
116119 }
117120
118121 $ policy_string = '' ;
You can’t perform that action at this time.
0 commit comments