+filetype and html-entity encode for non-JSON.