parpalak / i.upmath.me

Upmath LaTeX Renderer
https://i.upmath.me/
MIT License
54 stars 9 forks source link

Include the prefix `http://` or `https://` in the Image URL #4

Closed jonaprieto closed 6 years ago

jonaprieto commented 6 years ago

The image URL needs to include the prefixes mentioned in the title of this issue. Consider that copy such URLs do not work in Markdown files.

Just using an inline style:

![fx](//tex.s2cms.ru/png/f(x))

renders to

fx

Instead of:

fx

by prepending the http:// prefix

![fx](http://tex.s2cms.ru/png/f(x))
parpalak commented 6 years ago

Actually the URL scheme may be omitted and such scheme-agnostic URLs are perfectly valid: https://stackoverflow.com/questions/9161769/url-without-httphttps However, some markdown parsers (including Github) fail to detect them.

I could add the "https:" prefix for generated image URLs in the interface. But it would result in dropping old user agents without SNI (https://caniuse.com/#search=sni) if the "https" link appears on a "http" website. That's why I choose scheme-agnostic URLs for http://tex.s2cms.com/

jonaprieto commented 6 years ago

Ok. Maybe adding an option to choose.