- Issue created by @hetalsagar
Seckit Modules ClickJacking settings creates Unexpected token error in console.log
Precondition
- JS aggregation is "On" (admin/config/development/performance)
- Minify html, Purify html or any other kind of html purify setting is on
- Enables JavaScript + CSS + Noscript setting is "On" in Seckit module.
Error:
- Unexpected token error will occur and breaks further JavaScript execution
Here is Updated Function to get rid of that error:
public function seckitJsCssNoscript() {
// @todo Consider batter solution?
$content = $this->response->getContent();
$head_close_position = strpos($content, '');
if ($head_close_position) {
$noscriptcontent = $this->seckitGetJsCssNoscriptCode();
$noscriptcontent = trim(preg_replace( '/\s+/', ' ', $noscriptcontent));
$content = substr_replace($content, $noscriptcontent, $head_close_position, 0);
$this->response->setContent($content);
}
}
Active
2.0
Code