github / markup

Determines which markup library to use to render a content file (e.g. README) on GitHub
MIT License
5.87k stars 3.39k forks source link

linked images not rendering #1203

Closed RedSparr0w closed 6 years ago

RedSparr0w commented 6 years ago

Not sure if this is the correct repo to open this issue

When adding a link to images, it causes the image to not load. It seems that the image isn't converted to a https://camo.githubusercontent.com/13f33... link

Example:

Image without link:

badge

![badge](https://img.shields.io/github/issues/detail/s/github/markup/1203.svg)

Same image with link:

badge

[![badge](https://img.shields.io/github/issues/detail/s/github/markup/1203.svg)](https://github.com/github/markup/issues/1203)

Console Output:

Refused to load the image 'https://img.shields.io/github/issues/detail/s/GimmerBot/Gimmer/84.svg' because it violates the following Content Security Policy directive: "img-src data: 'self' data: assets-cdn.github.com identicons.github.com collector.githubapp.com github-cloud.s3.amazonaws.com *.githubusercontent.com".

Screenshot:

image

RedSparr0w commented 6 years ago

Looks like the image will load if you remove the protocol from the link: badge

-[![badge](https://img.shields.io/github/issues/detail/s/github/markup/1203.svg)](https://github.com/github/markup/issues/1203)
+[![badge](https://img.shields.io/github/issues/detail/s/github/markup/1203.svg)](//github.com/github/markup/issues/1203)
kivikakk commented 6 years ago

This repo is for questions pertaining to the github-markup gem only, which is pretty narrow; it just chooses a processor for a given file, it doesn't do any of the processing. Bug reports like this should go to support, who triage and assign them appropriately.

In this case, though, I know the relevant information about what is responsible for this bug, so I've opened the internal issue myself. I'll post an update back here when I have one, but I have no ETA for it.

RedSparr0w commented 6 years ago

Awesome, thanks for the reply, will close this issue.