Skip to content

fix: resolve broken external links and missing target handling in learning resources (#245)#266

Open
mithilP007 wants to merge 1 commit into
komalharshita:mainfrom
mithilP007:fix/issue-245
Open

fix: resolve broken external links and missing target handling in learning resources (#245)#266
mithilP007 wants to merge 1 commit into
komalharshita:mainfrom
mithilP007:fix/issue-245

Conversation

@mithilP007
Copy link
Copy Markdown

This PR resolves #245 by introducing a robust link helper utility to safely parse and standardize external link handling, registering a custom Jinja filter 'parse_resource' to handle formatting, and updating 'templates/project.html' to render resource links with appropriate target and rel attributes. Additionally, unit tests were added to verify the helper logic.

Copilot AI review requested due to automatic review settings May 18, 2026 05:28
@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

@mithilP007 is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting your first pull request to DevPath.

Before review:

  • Complete the PR template fully
  • Ensure all tests pass
  • Link your PR to an issue
  • Keep changes scoped to the issue

A maintainer will review your contribution soon.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR standardizes how project learning-resource links are parsed and rendered so external resources open safely in a new tab with appropriate security attributes.

Changes:

  • Added a reusable parse_external_link helper for extracting labels and URLs.
  • Registered a parse_resource Jinja filter through the main routes blueprint.
  • Updated the project detail template and added helper unit tests.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
utils/link_helper.py Adds link parsing utility for resource strings.
routes/main_routes.py Registers the helper as a Jinja template filter.
templates/project.html Uses parsed link metadata to render resource links safely.
tests/test_basic.py Adds unit coverage for the new link helper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mithilP007
Copy link
Copy Markdown
Author

Solved under Gssoc2026
you can checkout the change

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Broken External Links and Missing Target Handling Cause Navigation Disruption

2 participants