-
Notifications
You must be signed in to change notification settings - Fork 11
feat(utilities): markedSetNofollowLinks with hostname check #492
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
Conversation
barjin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for that, but according to git history @B4nan wrote majority of this file, but maybe he just moved it, I don't know |
|
I rewrote the whole codebase to TS and moved it to a monorepo :) |
barjin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking into this more, I'm all for merging this - now I see it just adds a new branch for Apify links from a different hostname, the rest of the code is untouched. LGTM, thanks!
drobnikj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Needed to solve https://github.com/apify/apify-core/issues/18466.
Now the
rel="noopener noreferrer nofollow" target="_blank"is added only if url is outside fromapify.comdomain.This enable passing hostname to
markedSetNofollowLinksfunction and settingrel="noopener noreferrer" target="_blank"for apify domain but different hostname.Once this is merged, next step would be to pass hostname from
safeMarkdownin console/frontend down tomarkedSetNofollowLinks