Skip to content

fix: use uri filter for URL params in templates#96

Draft
Koan-Bot wants to merge 1 commit intometacpan:masterfrom
Koan-Bot:koan.atoomic/fix-url-encoding-templates
Draft

fix: use uri filter for URL params in templates#96
Koan-Bot wants to merge 1 commit intometacpan:masterfrom
Koan-Bot:koan.atoomic/fix-url-encoding-templates

Conversation

@Koan-Bot
Copy link
Contributor

@Koan-Bot Koan-Bot commented Mar 20, 2026

What

Switches URL query parameter encoding from html_entity to uri filter in show-ls.tt and show-search.tt.

Why

html_entity encodes for HTML contexts (&&amp;, <&lt;) but doesn't percent-encode URL-unsafe characters like spaces, #, +, or =. When search filters contain these characters, the resulting URLs break — parameters get truncated or misinterpreted.

show-search.tt already used uri for 4 of 5 params but missed qifl. show-ls.tt used html_entity for all 6 params plus the file link.

How

  • show-ls.tt: all 6 query param variables + match.file in href → uri
  • show-search.tt: qifluri (aligns with the other params)

Other html_entity uses in templates (form input values, HTML content, title attributes) are correct and unchanged.

Testing

Verified all remaining html_entity uses in .tt files are in HTML attribute/content contexts where they belong.

🤖 Generated with Claude Code


Quality Report

Changes: 2 files changed, 8 insertions(+), 8 deletions(-)

Code scan: clean

Tests: failed (FAILED)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

show-ls.tt used html_entity for all URL query parameters and
show-search.tt used it for qifl. html_entity encodes for HTML contexts
(& → &amp;) but doesn't percent-encode URL-unsafe characters like
spaces, #, or +. This could break navigation links when search filters
contain special characters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant