Skip to content

fix(utils): strip quotes from quoted parameter values in params - #1876

Open
Yshuro wants to merge 1 commit into
forwardemail:masterfrom
Yshuro:fix/issue-1873
Open

Yshuro wants to merge 1 commit into
forwardemail:masterfrom
Yshuro:fix/issue-1873

Conversation

@Yshuro

@Yshuro Yshuro commented Nov 20, 2026

Copy link
Copy Markdown

Fixes #1873

Summary of Changes

  • In src/utils.js (exports.params), strip surrounding quotes from quoted parameter values (e.g. charset="UTF-8") and unescape any escaped characters inside according to RFC specifications.
  • Added a unit test in test/node/utils.js verifying that utils.params('text/html; charset="UTF-8"') correctly extracts { charset: 'UTF-8' }.

Signed-off-by: Yshuro <yshuro1080@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

res.charset keeps the quotes when the Content-Type charset is a quoted string

1 participant