Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Resolve protocol-relative URLs #123

Open
pR0Ps opened this issue Feb 6, 2019 · 1 comment
Open

Feature: Resolve protocol-relative URLs #123

pR0Ps opened this issue Feb 6, 2019 · 1 comment
Labels
enhancement Papercut Annoying but non critical

Comments

@pR0Ps
Copy link
Contributor

pR0Ps commented Feb 6, 2019

Sites that use protocol-relative URLs for external resources (ex: <img src="//example.org/some_image.jpg"/>) expect the resource to be loaded using the same protocol as the site. However, when pulling that URL into a feed reader, the resource is loaded based on the protocol used by the reader to show the content. This mismatch can create issues, for example if the reader caches the content to disk and displays it via a file:// URL.

For now, I've been using the following pattern as a workaround for specific cases:

"modify": [
    {
        "type": "replace",
        "search": "src=\"\/\/",
        "replace": "src=\"https:\/\/"
    }
]

These URLs should probably be automatically converted to protocol-absolute links so these sorts of workarounds aren't needed.

@dugite-code
Copy link
Contributor

Interesting, I haven't encountered any links like this personally. One solution I have toyed with in the past is a global modify option with url exclusions.

Note: After I merge the tags branch I want to do a feature freeze for a few months in order to focus on significant code re-factoring

@dugite-code dugite-code added the Papercut Annoying but non critical label Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Papercut Annoying but non critical
Projects
None yet
Development

No branches or pull requests

2 participants