Thank you for the review and feedback on the CSP.
Not exactly sure what inline javascript you are referred to. The only JS that the plugin loads is in the Widgets admin area–and this is being appended properly by enqueueing an external .js file.
Feel free to open a support thread here on WordPress or on GitHub and we will be happy to get that inline js issue sussed out!
-
This reply was modified 5 years, 11 months ago by
twinpictures. Reason: added links to support channels
Thread Starter
Name
(@e467gj6x)
Because this “inline js” was the cause of an only average review (***), I will post the js here:
The action when I select a category or year from the dropdown list:
<script type=’text/javascript’>
/* <![CDATA[ */
( function() {
var dropdown = document.getElementById( ‘wp-block-categories-1’ );
function onCatChange() {
if ( dropdown.options[ dropdown.selectedIndex ].value > 0 ) {
location.href = “https://luolaseura.fi/?cat=” + dropdown.options[ dropdown.selectedIndex ].value;
}
}
dropdown.onchange = onCatChange;
})();
/* ]]> */
</script>
I have now opened a support thread. Let’s see what causes this problem. But it’s clear that without allowing inline javascript the dropdown menus do nothing :/ WordPress is a complicated environment, as I have noticed during the last ten years…
-
This reply was modified 5 years, 11 months ago by
Name.
-
This reply was modified 5 years, 11 months ago by
Name.
Look forward to discovering where this is coming from, but I can assure you none of this code is found in our plugin. Are you sure there is not a filter being used by your theme or another plugin? Regardless, we’ll pick this up in the support forum in this thread.
Thread Starter
Name
(@e467gj6x)
Oops, sorry, that piece of code comes from WordPress core π
Not your fault. I will correct my original review.
That inline javascript that prevents proper use of CSP (and opens doors to XSS), comes from wp-includes/blocks/categories.php and from wp-includes/widgets/class-wp-widget-categories.php See: https://core.trac.wordpress.org/ticket/32067
-
This reply was modified 5 years, 11 months ago by
Name.
-
This reply was modified 5 years, 11 months ago by
Name.