Skip to content

Commit

Permalink
Fix polylang integration with different script tag
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyc committed Aug 22, 2024
1 parent 80fd46b commit d5add75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Integrations/Polylang.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function addConsentTag(): void
$script = str_replace(' type="text/javascript"', '', $script);
}

$script = str_replace(['<script>', '</script>'], '', $script);
$script = str_replace(['<script>', '</script>', "<script type='text/javascript'>"], '', $script);
echo wp_get_inline_script_tag($script, [
'data-gds-cmp-consent' => Consent::PREFERENCES,
'type' => 'text/plain',
Expand Down

0 comments on commit d5add75

Please sign in to comment.