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

The sitemap can show links with anchors #10291

Open
moorscode opened this issue Jul 9, 2018 · 4 comments
Open

The sitemap can show links with anchors #10291

moorscode opened this issue Jul 9, 2018 · 4 comments

Comments

@moorscode
Copy link
Contributor

Please give us a description of what happened.

tweet

This is highly likely coming from plugins (or themes) that hook into our sitemap flow.

How can we reproduce this behavior?

  1. Register a link to the sitemap containing a hashmark

Context

Links containing a hashmark are essentially the same URL as without.

Todo

  • Strip out any #.... additions in any sitemap URLs
    • This should be done using wp_parse_url with the PHP_URL_FRAGMENT fragment
@jonoalderson
Copy link

Hmm. Some site setups (particularly early generation Single Page Apps) might use anchor states, in conjunction with the History API, to change the page / state of the page.

E.g., example.com/#about and example.com/#products might render different states.

We should probably strip this automatically, but leave an option/filter for people to disable that disabling...

@jdevalk jdevalk removed the SEO label May 10, 2019
@Djennez Djennez removed the backlog label Dec 4, 2019
@markhowellsmead
Copy link

Has any progress been made on this? Are anchor links stripped from the sitemap URLs?

@PabVidCal
Copy link

Any news about this option?

@jonoalderson
Copy link

Do you have an example site which is including these? Would be good to understand what's causing this in the wild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants