Skip to content

Fix content app directory listing links with colons in base_path#7393

Draft
gerrod3 wants to merge 1 commit intopulp:mainfrom
gerrod3:fix/6955-colon-in-base-path-links
Draft

Fix content app directory listing links with colons in base_path#7393
gerrod3 wants to merge 1 commit intopulp:mainfrom
gerrod3:fix/6955-colon-in-base-path-links

Conversation

@gerrod3
Copy link
Contributor

@gerrod3 gerrod3 commented Mar 4, 2026

Summary

  • Fixes broken links in the content app's directory listing when a distribution's base_path contains colons (e.g. copr-pull-requests:pr:3825/).
  • Browsers were interpreting the text before the colon as a URL scheme. Prepending ./ to the href ensures the link is always treated as a relative path.

Test plan

  • Added unit tests for render_html with and without colons in directory names.
  • CI passes.

closes #6955

Made with Cursor

closes pulp#6955

Assisted-by: Claude (Cursor)
Made-with: Cursor
@gerrod3 gerrod3 force-pushed the fix/6955-colon-in-base-path-links branch from 0a21ea1 to e753f40 Compare March 4, 2026 21:03
@gerrod3
Copy link
Contributor Author

gerrod3 commented Mar 4, 2026

I wonder if changing to the a href=./path nomenclature would break more plugins and their tests.

@gerrod3 gerrod3 marked this pull request as draft March 5, 2026 02:32
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.

base_path with : causes a bad link in web browser

1 participant