You are here

private function InstapageCmsPluginPageModel::disableCloudFlareScriptReplace in Instapage plugin 8.3

Same name and namespace in other branches
  1. 7.3 core/models/InstapageCmsPluginPageModel.php \InstapageCmsPluginPageModel::disableCloudFlareScriptReplace()

Removes the CloudFlare JS from a landing page content.

Parameters

string $html HTML of a landing page.:

Return value

string HTML without CloudFlare script.

1 call to InstapageCmsPluginPageModel::disableCloudFlareScriptReplace()
InstapageCmsPluginPageModel::getLandingPageHTMLFromTheApp in core/models/InstapageCmsPluginPageModel.php
Gets and prepares Landing Page HTML from app (from request to so called enterprise)

File

core/models/InstapageCmsPluginPageModel.php, line 617

Class

InstapageCmsPluginPageModel
Class responsible for managing the landing pages.

Code

private function disableCloudFlareScriptReplace($html) {
  $pattern = '/(<script)(type="text\\/javascript")?(.*?)>/';
  return preg_replace($pattern, "\$1\$2 data-cfasync=\"false\" \$3>", $html);
}