moving html escape into if debug
fantastic