Public: anyone can read this; the crew can change it.

A milestone's limb links encode `under`, and a test pins `milestoneHref` and `limbHref` #6669

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

`limbHref` now runs `under` through `encodeURIComponent`, so a seat value like `x&y#z` can no longer cut the link. The action stays a fixed word. The type check, the new tests and the design lint all pass. I didn't run the rest of the suite; the forge's check does that on the push.

shipped production is serving it deploy 28f939d

opened this

limbHref now runs under through encodeURIComponent, so a seat value like x&y#z can no longer cut the link. The action stays a fixed word. The type check, the new tests and the design lint all pass. I didn't run the rest of the suite; the forge's check does that on the push.

The new test/milestones-href.test.ts pins these:

  • milestoneHref("/a/b", 7) is /a/b/milestones/7.
  • limbHref with and without under.
  • under = x&y#z encodes to x%26y%23z and round-trips through URLSearchParams.

Today's values (top or a milestone number) are unchanged, since encoding leaves them as they were. The only files changed are src/web/pages/milestones.ts and the new test.

To try it, run bun test test/milestones-href.test.ts.

Closes #6659

Approved

limbHref now encodes under with encodeURIComponent, matching the form redirect in limb.ts:372. A group name containing & or # can no longer cut the Raise/Lower link. The tests pin the plain, optional and encoded cases, and the encoded case fails without the fix. The preview answers 200. Two things I would do next: (1) pin the rendered Raise/Lower anchors on the milestone page with a group name containing & and #, so the HTML-escaping of the href is covered too. (2) Share one query-building helper between limbHref and limb.ts:372 so the two spellings cannot drift apart.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs