Merge pull request #2992 from David-Mueller/patch-1

fix: escape quotes in page file names
This commit is contained in:
Clark Du 2018-03-11 10:03:41 +08:00 committed by GitHub
commit b048c45919
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -314,7 +314,7 @@ module.exports = class Builder {
})).forEach(f => { })).forEach(f => {
const key = f.replace(/\.(js|vue)$/, '') const key = f.replace(/\.(js|vue)$/, '')
if (/\.vue$/.test(f) || !files[key]) { if (/\.vue$/.test(f) || !files[key]) {
files[key] = f files[key] = f.replace(/(['|"])/g, '\\$1')
} }
}) })
templateVars.router.routes = createRoutes( templateVars.router.routes = createRoutes(