File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 77 * file that was distributed with this source code.
88 */
99
10- import { parse } from 'node:url'
1110import type { IncomingMessage } from 'node:http'
1211
1312import debug from './debug.ts'
@@ -22,6 +21,7 @@ import type {
2221 GetRoutesForMethod ,
2322 RouteBuilderArguments ,
2423} from './types/url_builder.ts'
24+ import { safeDecodeURI } from './utils.ts'
2525
2626/**
2727 * Exposes the API to construct redirect routes
@@ -194,7 +194,7 @@ export class Redirect {
194194 let query : Record < string , any > = { }
195195
196196 const referrerUrl = this . #getReferrerUrl( )
197- const url = parse ( referrerUrl )
197+ const url = safeDecodeURI ( referrerUrl , false )
198198
199199 debug ( 'referrer url "%s"' , referrerUrl )
200200 debug ( 'referrer base url "%s"' , url . pathname )
@@ -247,7 +247,7 @@ export class Redirect {
247247 * Extract query string from the current URL
248248 */
249249 if ( this . #forwardQueryString) {
250- query = this . #qs. parse ( parse ( this . #request. url ! ) . query || '' )
250+ query = this . #qs. parse ( safeDecodeURI ( this . #request. url ! , false ) . query || '' )
251251 }
252252
253253 /**
You can’t perform that action at this time.
0 commit comments