| … | … | @@ -22,6 +23,45 @@ export const secretRequestPrivacyNote = (item: Pick<SecretRequestItem, "delivery | |
| 26 | + | // Backticks, <angle brackets> and markdown link targets keep their exact text; a bare link drops | |
| 27 | + | // trailing sentence punctuation. | |
| 28 | + | const REASON_LINK = | |
| 29 | + | /`(https?:\/\/[^`\s]+)`|<(https?:\/\/[^>\s]+)>|\]\((https?:\/\/[^)\s]+)\)|(https?:\/\/[^\s<>"'`[\]]+)/giu; | |
🟠 High src/secretRequest.ts:29
REASON_LINK truncates Markdown link targets at the first ), so Sign in [here](https://auth.example/login?state=abc(def)) opens https://auth.example/login?state=abc(def and drops part of the sign-in state. Parse balanced parentheses before treating a ) as the Markdown delimiter.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file @packages/client-runtime/src/secretRequest.ts around line 29: |
| 2 | |
| 3 | `REASON_LINK` truncates Markdown link targets at the first `)`, so `Sign in [here](https://auth.example/login?state=abc(def))` opens `https://auth.example/login?state=abc(def` and drops part of the sign-in state. Parse balanced parentheses before treating a `)` as the Markdown delimiter. |
Note
🤖 Claude Opus 5.5 responding on behalf of Theo
Fixed in d265ad754d2. Markdown link targets now allow one level of balanced parentheses, as CommonMark does. Added the row Sign in [here](https://a.dev/login?state=abc(def)). to the secretRequestLink table, and it gives the exact URL.