diff --git a/src/Handler/ReplaceJavaScripts.php b/src/Handler/ReplaceJavaScripts.php index 2df7408..5a0b2c0 100644 --- a/src/Handler/ReplaceJavaScripts.php +++ b/src/Handler/ReplaceJavaScripts.php @@ -28,7 +28,7 @@ public function __construct(RenderBlock $renderBlock, string $persistentClass) public function handle(Handler $ajax, string $view, array $parameters = []): Handler { - $ajax->container(sprintf('script:not(.%s, [nonce])', $this->persistentClass))->remove(); + $ajax->container(sprintf('script:not(.%s):not([nonce])', $this->persistentClass))->remove(); try { $javaScripts = $this->renderBlock->render($view, 'javascripts', $parameters); diff --git a/src/Handler/ReplaceStyleSheets.php b/src/Handler/ReplaceStyleSheets.php index c25c152..0fdf1b7 100644 --- a/src/Handler/ReplaceStyleSheets.php +++ b/src/Handler/ReplaceStyleSheets.php @@ -28,7 +28,7 @@ public function __construct(RenderBlock $renderBlock, string $persistentClass) public function handle(Handler $ajax, string $view, array $parameters = []): Handler { - $ajax->container(sprintf('style:not(.%s, [nonce])', $this->persistentClass))->remove(); + $ajax->container(sprintf('style:not(.%s):not([nonce])', $this->persistentClass))->remove(); try { $styleSheets = $this->renderBlock->render($view, 'stylesheets', $parameters);