mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 20:30:04 +02:00
update packages to latest version
This commit is contained in:
8
node_modules/iconv-lite/encodings/utf7.js
generated
vendored
8
node_modules/iconv-lite/encodings/utf7.js
generated
vendored
@@ -74,7 +74,7 @@ Utf7Decoder.prototype.write = function(buf) {
|
||||
if (i == lastI && buf[i] == minusChar) {// "+-" -> "+"
|
||||
res += "+";
|
||||
} else {
|
||||
var b64str = base64Accum + buf.slice(lastI, i).toString();
|
||||
var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii");
|
||||
res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ Utf7Decoder.prototype.write = function(buf) {
|
||||
if (!inBase64) {
|
||||
res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
|
||||
} else {
|
||||
var b64str = base64Accum + buf.slice(lastI).toString();
|
||||
var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii");
|
||||
|
||||
var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
|
||||
base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
|
||||
@@ -245,7 +245,7 @@ Utf7IMAPDecoder.prototype.write = function(buf) {
|
||||
if (i == lastI && buf[i] == minusChar) { // "&-" -> "&"
|
||||
res += "&";
|
||||
} else {
|
||||
var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/');
|
||||
var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, '/');
|
||||
res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ Utf7IMAPDecoder.prototype.write = function(buf) {
|
||||
if (!inBase64) {
|
||||
res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
|
||||
} else {
|
||||
var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/');
|
||||
var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, '/');
|
||||
|
||||
var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
|
||||
base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
|
||||
|
Reference in New Issue
Block a user