Open RavanH opened 7 years ago
Thanks for the report! External links in post and page content should be correctly treated as external, but the same isn't true for widgets — because a lot of widgets have internal links. For now, you can add rel="external"
or target="_blank"
to the a
to indicate that it's an external link. In the next release, I'll add text widgets to the same check that runs on the post content for links.
Wouldn't it be easier to check for the top level domain upon link click? When there is a full domain path and it is a mismatch, the link is treated as external... That would prevent having to "parse" sections of the site beforehand.
There was a reason I didn't go this route early on in development, but to be honest I don't remember why. I'll give it another go and we'll see 😄
Haha, that's familiar ;) ... maybe to allow multiple domains in case of plugins like Polylang or WPML?
I'm running the latest and not replicating this locally. I'm also not seeing this issue on the demo site following @RavanH's directions. Am I misunderstanding the issue?
Well, I must be crazy because just a few seconds after my first comment, I replicated. I've sent a PR for an initial fix that should be tested a bit more: https://github.com/ryelle/Foxhound/pull/87
For example, go to the demo site https://themes.redradar.net/foxhound/ and scroll all the way down to the "About" widget. Click the "Foxhound" link that points to github.
Clicking that link will be caught by the theme script and treated as an internal link. The result is a 404 response form WordPress.