File tree 2 files changed +3
-6
lines changed
2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change 1
- import qs from 'querystring'
2
1
import path from 'path'
3
2
import type { SFCBlock , SFCDescriptor } from 'vue/compiler-sfc'
4
3
import type { ResolvedOptions } from '.'
@@ -426,8 +425,8 @@ function attrsToQuery(
426
425
for ( const name in attrs ) {
427
426
const value = attrs [ name ]
428
427
if ( ! ignoreList . includes ( name ) ) {
429
- query += `&${ qs . escape ( name ) } ${
430
- value ? `=${ qs . escape ( String ( value ) ) } ` : ``
428
+ query += `&${ encodeURIComponent ( name ) } ${
429
+ value ? `=${ encodeURIComponent ( value ) } ` : ``
431
430
} `
432
431
}
433
432
}
Original file line number Diff line number Diff line change 1
- import qs from 'querystring'
2
-
3
1
export interface VueQuery {
4
2
vue ?: boolean
5
3
src ?: string
@@ -14,7 +12,7 @@ export function parseVueRequest(id: string): {
14
12
query : VueQuery
15
13
} {
16
14
const [ filename , rawQuery ] = id . split ( `?` , 2 )
17
- const query = qs . parse ( rawQuery ) as VueQuery
15
+ const query = Object . fromEntries ( new URLSearchParams ( rawQuery ) ) as VueQuery
18
16
if ( query . vue != null ) {
19
17
query . vue = true
20
18
}
You can’t perform that action at this time.
0 commit comments