:icecream: Powerful software development experience and management. Enhancing @tc39 JS, @denoland and @nodejs, because we need a bit of magic. :sparkles: You can think of it as Cargo for the JavaScript ecosystem.
Mozilla Public License 2.0
331
stars
41
forks
source link
koa-better-body doesn't correctly parse ampersands in multipart form #80
I'm using koa-better-body as middleware for a backend-only web application. When I submit a multipart form with a text description that has an ampersand (i.e. "Love this B&W shot"), the browser correctly sends the payload, but better-body turns the part after the ampersand into a new field. Think the error is happening here:
I'm using koa-better-body as middleware for a backend-only web application. When I submit a multipart form with a text description that has an ampersand (i.e. "Love this B&W shot"), the browser correctly sends the payload, but better-body turns the part after the ampersand into a new field. Think the error is happening here:
https://github.com/tunnckoCore/koa-better-body/blob/master/utils.js#L208-L214
Does it look that's where the problem is? I'd be happy to submit a pull request if someone isn't already addressing this.
Example:
Chrome sends server:
ctx.request.fields prints out: