Backported from master

MOB-2292: Fixed HTML escaping in JSON-ified HTML