-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
8 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
The redirect property returned from a module's load function must now be a properly encoded URI string value. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<a href="/encoded/苗条">苗条</a> | ||
<a href="/encoded/土豆">土豆</a> | ||
<a href="/encoded/反应">反应</a> | ||
<a href="/encoded/redirect">Redirect</a> |
9 changes: 9 additions & 0 deletions
9
packages/kit/test/apps/basics/src/routes/encoded/redirect.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<script context="module"> | ||
/** @type {import('@sveltejs/kit').Load} */ | ||
export function load() { | ||
return { | ||
status: 307, | ||
redirect: 'redirected?embedded=' + encodeURIComponent('/苗条?foo=bar&fizz=buzz') | ||
}; | ||
} | ||
</script> |
17 changes: 17 additions & 0 deletions
17
packages/kit/test/apps/basics/src/routes/encoded/redirected.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<script context="module"> | ||
/** @type {import('@sveltejs/kit').Load} */ | ||
export function load({ url }) { | ||
return { | ||
props: { | ||
// nb: .get() on URLSearchParams does a decoding pass, so we should see the raw values. | ||
embedded: url.searchParams.get('embedded') | ||
} | ||
}; | ||
} | ||
</script> | ||
<script> | ||
/** @type {string} */ | ||
export let embedded; | ||
</script> | ||
|
||
<pre>{embedded}</pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
export function load() { | ||
return { | ||
status: 307, | ||
redirect: '苗条' | ||
redirect: encodeURI('苗条') | ||
}; | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters