Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle route encoding #8325

Merged
merged 22 commits into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix ensure not doing double encoding
  • Loading branch information
pi0 committed Nov 30, 2020
commit 69c2a2f7c556d3816083273c236833edbf998f33
2 changes: 1 addition & 1 deletion packages/config/src/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export function getNuxtConfig (_options) {
if (!/\/$/.test(options.router.base)) {
options.router.base += '/'
}
options.router.base = encodeURI(options.router.base)
options.router.base = encodeURI(decodeURI(options.router.base))

// Legacy support for export
if (options.export) {
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-renderer/src/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export default class VueRenderer {
consola.debug(`Rendering url ${url}`)

// Add url to the renderContext
renderContext.url = encodeURI(url)
renderContext.url = encodeURI(decodeURI(url))

// Add target to the renderContext
renderContext.target = this.options.target
Expand Down