-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Properly parse meta tag when parameters are reversed #682
fix: Properly parse meta tag when parameters are reversed #682
Conversation
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. |
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" />