waibu 1.1.19 → 1.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu",
3
- "version": "1.1.19",
3
+ "version": "1.1.20",
4
4
  "description": "Web Framework for Bajo",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/plugin/factory.js CHANGED
@@ -273,6 +273,7 @@ async function factory (pkgName) {
273
273
  let url = info.path
274
274
  const langDetector = get(cfg, 'intl.detectors', [])
275
275
  if (info.ns) url = trimEnd(langDetector.includes('path') ? `/${params.lang ?? ''}${this.routeDir(info.ns)}${info.path}` : `${this.routeDir(info.ns)}${info.path}`, '/')
276
+ url = url.split('/').map(u => encodeURI(u)).join('/')
276
277
  info.qs = defaultsDeep({}, query, info.qs)
277
278
  if (!isEmpty(info.qs)) url += '?' + this.qs.stringify(info.qs)
278
279
  if (!url.startsWith('http') && guessHost) url = `http://${this.config.server.host}:${this.config.server.port}/${trimStart(url, '/')}`