Cloak only in HTML mode

On raw or json requests (format=raw) the cloaking javascript code is injected into the response which can lead to a strange behavior. For example the whole page turns into whit with only the mail address displayed. This bug was discoverd while using the free version of DPCalendar https://joomla.digital-peak.com/products/dpcalendar.