Browse code

Replace newlines with spaces in policy text to prevent JS to break.

Benjamin Roth authored on09/06/2015 19:35:38
Showing1 changed files
... ...
@@ -63,7 +63,7 @@ class CookiePolicy extends \Frontend
63 63
 		
64 64
 		// Set template vars
65 65
 		$objTemplate->title = $GLOBALS['TL_LANG']['MSC']['esm_cookiepolicy']['title'];
66
-		$objTemplate->text = $this->replacePlaceholders($this->objRootPage->esm_cookiepolicy_text);
66
+		$objTemplate->text = preg_replace('/(\\n|\\r)/',' ',$this->replacePlaceholders($this->objRootPage->esm_cookiepolicy_text));
67 67
 		$objTemplate->btn_confirm = $GLOBALS['TL_LANG']['MSC']['esm_cookiepolicy']['btn_confirm'];
68 68
 		$objTemplate->commitURL = 'system/modules/eSM_cookiepolicy/ajax/Ajax.php?do=cookiepolicy_authentication&cookiepolicy_commit='.$this->createToken();
69 69