Stop duplicating the code for issuing data: urls, and try to use a non-base64 one if it's shorter.