Repository navigation
fix: reject scheme-only story URLs in feeds externalHref - #921
Open
devin-ai-integration[bot] wants to merge 3 commits into
Open
devin-ai-integration[bot] wants to merge 3 commits into
devin-ai-integration[bot] wants to merge 3 commits into
Conversation
…ve as app routes Co-Authored-By: Ishita Gupta <ishita.gupta@cognition.ai>
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…n' into devin/1792606600-react-feeds-href-fix
…p' prefix check Co-Authored-By: Ishita Gupta <ishita.gupta@cognition.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #918 for the Devin Review finding. In e49378c (#918) I changed
externalHrefto return the rawurlinstead ofnew URL(url).href. That reopened a gap:new URL('https:example.com')parses ashttps://example.com/, but the browser treatshref="https:example.com"as relative on an https page and resolves it to/example.com, a route inside the app.externalHrefhas since moved toshared/utils(eb20b9c) and item-details now uses it too, so after merging the base branch this fix covers feed titles and item-detail titles.Only absolute
http(s)://URLs become external links now. Scheme-only forms such ashttps:example.comandhttp:/xfall back to the internal/item/:idlink. Valid URLs are still returned unchanged, so the Angular parity from e49378c holds. Two test cases added; the full suite passes (220 tests).Devin-Org: engineering
Link to Devin session: https://devin-gtm.devinenterprise.com/sessions/cd07a47aec7c48daa5e331248f55d0bd
Open in Devin Desktop: https://devin-gtm.devinenterprise.com/desktop/session/cd07a47aec7c48daa5e331248f55d0bd?variant=devin
Requested by: @ishita-cog
Devin Review