File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/open-next/src/adapters/routing Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -12,17 +12,22 @@ export function isExternal(url?: string) {
12
12
}
13
13
14
14
export function getUrlParts ( url : string , isExternal : boolean ) {
15
+ // NOTE: when redirect to a URL that contains search query params,
16
+ // compile breaks b/c it does not allow for the '?' character
17
+ // We can't use encodeURIComponent because modal interception contains
18
+ // characters that can't be encoded
19
+ url = url . replaceAll ( "?" , "%3F" ) ;
15
20
if ( ! isExternal ) {
16
21
return {
17
22
hostname : "" ,
18
- pathname : encodeURIComponent ( url ) ,
23
+ pathname : url ,
19
24
protocol : "" ,
20
25
} ;
21
26
}
22
27
const { hostname, pathname, protocol } = new URL ( url ) ;
23
28
return {
24
29
hostname,
25
- pathname : encodeURIComponent ( pathname ) ,
30
+ pathname,
26
31
protocol,
27
32
} ;
28
33
}
You can’t perform that action at this time.
0 commit comments