| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
This is not identical (and there is a reason why the function checks character ranges)
This function is supposed to do ASCII lowercasing, not Unicode lowercasing
TextDecoder has the same issue for label normalization btw, as it incorrectly uses .toLowerCase at
Line 332 in b1c01fc
See spec: https://tc39.es/ecma262/#sec-string.prototype.tolowercase and notes there
As an example, '\u212A'.toLowerCase() === 'k'
toLowerCase can convert non-ascii characters into ascii characters (which makes e.g. current TextDecoder label handling incorrect, among all its other bugs)
text/html charset=gb\u212A should not turn into text/html charset=gbk
Sorry, something went wrong.
|
What would be helpful is to move toASCIILower out to some helper lib and to fix TextDecoder label handling to use it instead of .toLowerCase. |
Sorry, something went wrong.
Thanks I will try this idea |
Sorry, something went wrong.
Co-authored-by: Nikita Skovoroda <chalkerx@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #61107 +/- ##
==========================================
- Coverage 88.53% 88.52% -0.01%
==========================================
Files 703 703
Lines 208546 208548 +2
Branches 40217 40224 +7
==========================================
- Hits 184634 184620 -14
- Misses 15926 15958 +32
+ Partials 7986 7970 -16
... and 43 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. With green CI and confirmed by benchmark CI.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
PR-URL: #61107 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #61107 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #61107 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #61107 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #61107 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #61107 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #61107 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #61107 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
| Back | FazBrowse Home | New Git URL |
benchmark results (mimetype-instantiation.js):
application/ecmascript +54%
text/html charset=gbk +24%
text/html long...=x charset=gbk +21%