Skip to content
This repository was archived by the owner on Nov 29, 2022. It is now read-only.

Change "url" function to avoid anchor links #62

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

djprmf
Copy link

@djprmf djprmf commented Apr 19, 2016

Hi Buffer Team,

This is just a quick update/suggestion that could help publishers to share the correct link, removing possibles anchors from the URL.
The function is the same as "window.location.href", but will stripe all the anchor tags ("example.com/page.html#anchor" is converted to "example.com/page.html" )

This way is removed any anchor text from the link, that could have impact in the sharing (for instance, on Facebook Pages with Instant articles, where a link with and without anchor text is marked as "different") or that can lead the users to "jump" in the page without being that what the publisher wants...
If needed, the link with anchor tags can still be shared manually by the user in the text area (this is just related with the "auto fetch" of the page link). Google Analytics tags are also not affected in any way for what i can see...

Probably there is other ways of do this. But this is the easy one and, probably, the one more "compatibility safe".

Keep going with the great work!

This is just a quick update/suggestion that could help publishers to share the correct link, removing possibles anchors from the URL.
The function is the same as "window.location.href", but will stripe all the anchor tags ("example.com/page.html#anchor" is converted to "example.com/page.html" )

This way is removed any anchor text from the link, that could have impact in the sharing (for instance, on Facebook Pages with Instant articles, where a link with and without anchor text is marked as "different") or that can lead the users to "jump" in the page without being that what the publisher wants...
If needed, the link with anchor tags can still be shared manually by the user in the text area (this is just related with the "auto fetch" of the page link). Google Analytics tags are also not affected in any way...
@djprmf
Copy link
Author

djprmf commented Oct 13, 2017

No one?

@hitherejoe
Copy link
Contributor

@josem @chayjay same for this one too, do we need this one? 🙂

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

Successfully merging this pull request may close these issues.

2 participants