fix: resolve broken external links and missing target handling in learning resources (#245) - #266
fix: resolve broken external links and missing target handling in learning resources (#245)#266mithilP007 wants to merge 2 commits into
Conversation
|
@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. |
There was a problem hiding this comment.
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_linkhelper for extracting labels and URLs. - Registered a
parse_resourceJinja 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.
|
Solved under Gssoc2026 |
|
@mithilP007 resolve the merge conflicts |
# Conflicts: # templates/project.html
|
Now you can check i have fixed it |
komalharshita
left a comment
There was a problem hiding this comment.
Thanks for the contribution — improving broken learning-resource links and standardizing external-link handling is a valuable quality improvement for DevPath.
The overall direction of the PR is good, especially because learning resources are a core part of the user experience and inconsistent/broken external links reduce trust in the platform.
What was done well
- Focuses on a real usability issue
- Improves consistency of external-link behavior
- Keeps the scope reasonably targeted
- Helps improve learning-resource reliability
- Aligns well with existing external-link security practices
Important things to verify before merge
-
Any use of:
target="_blank"
should also consistently include:
rel="noopener noreferrer"
for security reasons.
-
Please confirm that:
- all modified links were manually tested
- no valid existing URLs were accidentally changed
- internal navigation behavior remains unaffected
-
If dataset/resource entries were updated, maintainers should also verify:
- project pages render correctly
- recommendation cards still function properly
- malformed URLs are not introduced
-
If not already included, automated validation/tests for external-link handling would be a good addition.
Overall, this is a useful quality-focused fix, but the above verification points should be completed before merge.
|
@mithilP007 kindly resolve the merge conflicts |
|
Closing this PR for inactivity. Please open a fresh PR if possible. |
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.