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

ref #1803: fix cross-origin links in history router mode #1967

Merged
merged 1 commit into from
Jan 22, 2023

Conversation

trusktr
Copy link
Member

@trusktr trusktr commented Jan 22, 2023

the crossOriginLinks option is no longer needed, remove misspelled "crossorgin" link helper, and instead detect cross origin links and don't handle them as internal

Summary

External links are now navigable by default when routerMode is history, regardless of the externalLinksTarget value.

The crossOriginLinks option was added as a way to force external links to not be handled as internal.

Instead, that feature has been removed, and now we use isExternal to check for external links, and avoid handling them as internal.

The value of an <a> tag's target is no longer used as our external link check.

What kind of change does this PR introduce?

Bugfix
Docs

For any code change,

  • Related documentation has been updated if needed
  • Related tests have been updated or tests have been added

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

The crossOriginLinks option is now ignored. I don't think this is breaking. I think people want external links to work properly, so at worst some people will have listed all their links in that array, but now they don't have to.

Thinking of tests to add...

Related issue, if any:

fixes #1803

Tested in the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE (of course not!)

…sspelled "crossorgin" link helper, and instead detect cross origin links and don't handle them as internal
@vercel
Copy link

vercel bot commented Jan 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
docsify-preview ✅ Ready (Inspect) Visit Preview Jan 22, 2023 at 7:13AM (UTC)

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 292e788:

Sandbox Source
docsify-template Configuration
nostalgic-sea-zouvg0 Issue #1803

trusktr added a commit to lume/lume.github.io that referenced this pull request Jan 22, 2023
Copy link
Member

@Koooooo-7 Koooooo-7 left a comment

Choose a reason for hiding this comment

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

LGTM !

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.

external links don't work in history router mode
3 participants