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

Fix reblog attribution link directing to custom domains #172

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

syeopite
Copy link
Owner

@syeopite syeopite commented Jan 2, 2025

On blogs with a custom domain the url given in rebloggedFrom*
and rebloggedRoot* will use their custom domain instead of a
regular tumblr domain.

In order to preserve the slug of the post priviblur uses the url given
from rebloggedFrom* and rebloggedRoot* which meant that users can be
directed to an external site unknowingly.

This PR fixes that by using the url given in the parentPostUrl
which should always be a regular tumblr link. Redundancy is also added
in that priviblur will check if the URL is a Tumblr domain and return
a span if it isn't and priviblur is unable to create a url to the original
post

On blogs with a custom domain the url given in rebloggedFrom*
and rebloggedRoot* will use their custom domain instead of a
regular tumblr domain.

In order to preserve the slug of the post priviblur uses the url given
from rebloggedFrom* and rebloggedRoot* which meant that users can be
directed to an external site unknownly.

This commit fixes that by using the url given in the parentPostUrl
which should always be a regular tumblr link. Redundancy is also added
in that priviblur will check if the URL is a Tumblr domain and return
a span if it isn't and priviblur is unable to create a url to the original
post
@syeopite syeopite merged commit 923ef6b into master Jan 2, 2025
3 checks passed
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.

1 participant