From aa450a2ebe27e64389a7aa17edf50a71cdba9d2b Mon Sep 17 00:00:00 2001 From: Lunar Date: Thu, 7 Jan 2021 15:29:39 +0100 Subject: [PATCH] Source reCAPTCHA API only when needed When using a subscription form as an iframe, our CSP catched up that the reCAPTCHA API was included despite MailPoet being configured to use its internal CAPTCHA. The following change will only output the relevant '; + + $captcha = $this->settings->get('captcha'); + if (!empty($captcha['type']) && $captcha['type'] === Captcha::TYPE_RECAPTCHA) { + echo ''; + } + $scripts = ob_get_contents(); ob_end_clean(); if ($scripts === false) {