CDATA removing new line in script tag in wordpress

This is being caused by core bug #33106 which was unfortunately introduced with the security fixes in 4.1.6 (and 4.2.3). New lines are erroneously being stripped from CDATA blocks in this situation.

From the bug ticket:

As of 4.2.3, depending on how a CDATA block is used, the stripping of new lines in this content may break when displayed on the front end, even when published with unfiltered_html capabilities.

A fix is in the works and should be released in 4.1.7 (and 4.2.4). More info here: https://make.wordpress.org/core/2015/07/30/wordpress-4-2-4-release-candidate-1/