fixed base64 and html formatting problems