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

rendering: Avoid prepending URL prefix to links that start with a scheme #817

Merged
merged 1 commit into from
Oct 10, 2019
Merged

rendering: Avoid prepending URL prefix to links that start with a scheme #817

merged 1 commit into from
Oct 10, 2019

Conversation

zaeleus
Copy link
Contributor

@zaeleus zaeleus commented Oct 10, 2019

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, 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.


IMPORTANT: Please do not create a Pull Request adding a new feature without discussing it first.

The place to discuss new features is the forum: https://zola.discourse.group/
If you want to add a new feature, please open a thread there first in the feature requests section.

Sanity check:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Code changes

(Delete or ignore this section for documentation changes)

  • Are you doing the PR on the next branch?

If the change is a new feature or adding to/changing an existing one:

  • Have you created/updated the relevant documentation page(s)?

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
Copy link
Collaborator

@Keats Keats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small change but everything looks perfect otherwise.

components/rendering/src/markdown.rs Show resolved Hide resolved
@Keats Keats merged commit f6d5ae5 into getzola:next Oct 10, 2019
@Keats
Copy link
Collaborator

Keats commented Oct 10, 2019

Thanks!

Keats pushed a commit that referenced this pull request 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 pushed a commit that referenced this pull request Feb 3, 2020
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants