fix: Properly parse meta tag when parameters are reversed #682
Conversation
2 commits
Oct 7, 2019
added fix convertBody for reverse http-equiv
Codecov Report
@@ Coverage Diff @@
## master #682 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 7 7
Lines 575 579 +4
Branches 183 185 +2
=====================================
+ Hits 575 579 +4
Continue to review full report at Codecov.
|
In v3, we are going to be replacing the regex system with an actual parser in Richienb/fetch-charset-detection/src/index.ts#L53 but we can still use this as a band-aid patch if we do eventually make a final release for v2. I'm adding some unit tests now. |
@Richienb Thank you for your reply. |
isaacs
added a commit
to npm/minipass-fetch
that referenced
this pull request
Oct 18, 2019
This was referenced Sep 12, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
convertBody
function work fine when html has this meta tag.<meta http-equiv="content-type" content="text/html;charset=shift_jis">
However, if the
http-equiv
attribute is reversed like this, it will not work.<meta content="text/html; charset=Shift_JIS" http-equiv="Content-Type" />