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

tel: links get erroneously absolutized #816

Closed
eamsden opened this issue Oct 8, 2019 · 1 comment
Closed

tel: links get erroneously absolutized #816

eamsden opened this issue Oct 8, 2019 · 1 comment
Labels
bug done in pr Already done in a PR

Comments

@eamsden
Copy link

eamsden commented Oct 8, 2019

Bug Report

When Zola renders a Markdown file with tel: links e.g.

[(123) 456-7890](tel:+11234567890)

It incorrectly prepends the absolute path to the directory containing the page containing the link.

So instead of e.g.

<a href="tel:+11234567890">(123) 456-7890</a>

It generates

<a href="https://mysite.com/mydir/tel:+11234567890">(123) 456-7890</a>

Environment

Zola version: zola 0.6.0

Expected Behavior

Zola should generate HTML links with the verbatim URL from markdown links with tel: prefixes

Current Behavior

Zola generates HTML links with the path to directory containing the the page containing the link prefixing tel: urls.

Step to reproduce

Create a markdown file in a Zola site containing a link to a tel: URL.

@zaeleus
Copy link
Contributor

zaeleus commented Oct 9, 2019

I can work on this. I'll likely generalize it for all schema-like patterns, as only mailto: is handled right now.

#747 is related.

@Keats Keats added the bug label Oct 9, 2019
Keats pushed a commit that referenced this issue Oct 10, 2019
…eme (#817)

Links that start with a scheme (e.g., `tel:18008675309`) inadvertently
had a URL prefix prepended. Previously, only `mailto:` was handled, but
given the sheer number of [registered URI schemes][uri-schemes], a loose
pattern matcher is used to detect schemes instead.

External links, as identified by the renderer, are now limited to `http`
and `https` schemes.

Fixes #747 and fixes #816.

[uri-schemes]: https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml
@Keats Keats added the done in pr Already done in a PR label Oct 10, 2019
Keats pushed a commit that referenced this issue Oct 24, 2019
…eme (#817)

Links that start with a scheme (e.g., `tel:18008675309`) inadvertently
had a URL prefix prepended. Previously, only `mailto:` was handled, but
given the sheer number of [registered URI schemes][uri-schemes], a loose
pattern matcher is used to detect schemes instead.

External links, as identified by the renderer, are now limited to `http`
and `https` schemes.

Fixes #747 and fixes #816.

[uri-schemes]: https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml
@Keats Keats closed this as completed in b1ceb3e Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug done in pr Already done in a PR
Projects
None yet
Development

No branches or pull requests

3 participants