This method doesn't require an internet connection…
- base64-encode the
<svg>
markup (eg. paste svg at base64encode.org) - URL-encode the base64-encoded string (eg. paste base64 string at urlencoder.org)
- Put the resulting string in

The result would be a string similar to the following that can be inserted into a Jupyter Notebook Markdown cell…
1) the referenced base64 block stops being parsed right at the point where 'a new chunk of image' starts, the green part ... So4Z4wxkXa7KukmKul2dDvd ...
2) by passing the block directly we get the whole image
This was tested with http://tmpvar.com/markdown.html. I don't know how it behaves on github. The issue has been already well discussed.