diff --git a/src/View/CSPBackend.php b/src/View/CSPBackend.php index db8d1ac..80c4fc0 100644 --- a/src/View/CSPBackend.php +++ b/src/View/CSPBackend.php @@ -61,8 +61,11 @@ public function insertHeadTags($html, $uniquenessID = null): void $type = $this->getTagType($html); if ($type === 'javascript') { $options = $this->getOptions($html); - static::$headJS[$uniquenessID] = [strip_tags($html) => $options]; - ControllerCSPExtension::addJS(strip_tags($html)); + // Grab everything between the script tags. All matches are okay, but the last one is the actual script content + preg_match('/