* Inside a parenthesized group, the parser distinguishes a named outlet (`name:path`) from the * unprefixed primary child by looking for a `:` in the first segment token. A primary child whose * first segment legitimately contains a colon (e.g. a param value `admin:y`) would therefore be * mispar
(serializedPrimary: string)
| 564 | * misparsed as outlet `admin` on round-trip. Percent-encode colons in that leading token only. |
| 565 | */ |
| 566 | function escapeOutletDelimiter(serializedPrimary: string): string { |
| 567 | return serializedPrimary.replace(SEGMENT_RE, (firstSegment) => firstSegment.replace(/:/g, '%3A')); |
| 568 | } |
| 569 | |
| 570 | /** |
| 571 | * Encodes a URI string with the default encoding. This function will only ever be called from |
no test coverage detected