Fix escaped preview action javascript