# Upload image bug when URL contains encoded special characters

When I try to add image from the web with a link that contains special characters (even after encoding), the link seems to be truncated somewhere.

https://latex.codecogs.com/gif.latex?%5c%73%75%6d%5c%6c%69%6d%69%74%73%5f%7b%69%3d%31%7d%5e%6e%20%28%6e%2b%31%29%5e%33%20%2d%20%5c%73%75%6d%5c%6c%69%6d%69%74%73%5f%7b%69%3d%31%7d%5e%6e%20%6e%5e%33%20%3d%20%28%6e%2b%31%29%5e%33%20%2d%20%31


By right, this should show up as:

$\sum\limits_{i=1}^n (n+1)^3 - \sum\limits_{i=1}^n n^3 = (n+1)^3 - 1$

But what I got:

If possible, I would appreciate that the following link is supported by the image uploader, too (since this is how Firefox encodes the link):

https://latex.codecogs.com/gif.latex?%5Csum%5Climits_%7Bi%3D1%7D%5En%20(n%2B1)%5E3%20-%20%5Csum%5Climits_%7Bi%3D1%7D%5En%20n%5E3%20%3D%20(n%2B1)%5E3%20-%201


I don't demand MathJax being loaded for every site, since it sacrifices user experience on sites that don't use them much. I was very tolerant and even write a function to percentage encode the whole query string and run it in the JS console. However, the image uploader doesn't even accept the fully percentage-encoded link, which left me with even more roundabout choices.

• Can you explain the use case for this? What Stack Exchange site are you uploading this to that does not already support Latex via MathJax? – Oded Feb 7 '14 at 14:54
• @Oded: CodeGolf. Just want to explain something over there. (I'd use MathJax already if it is supported...) – nhahtdh Feb 7 '14 at 14:56
• I see. Simple workaround - save the image and upload it. – Oded Feb 7 '14 at 14:58
• Another workaround, which works at least in Chrome / Win7 (just tested it) is to copy the image itself instead of its URL to the clipboard and paste it into the upload dialog. But I do agree that this should be fixed. – Ilmari Karonen Feb 11 '14 at 16:11