Procházet zdrojové kódy

fixed charset parsing

Gildas před 7 roky
rodič
revize
f22dd37f93
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      lib/single-file/single-file-browser.js

+ 1 - 1
lib/single-file/single-file-browser.js

@@ -50,7 +50,7 @@ this.SingleFile = (() => {
 					return "data:base64,";
 				}
 			} else {
-				const matchCharset = contentType.match(/\s*;\s*charset\s*=\s*(.*)(;|$)/i);
+				const matchCharset = contentType.match(/\s*;\s*charset\s*=\s*"?([^";]*)"?(;|$)/i);
 				if (matchCharset && matchCharset[1]) {
 					const charSet = matchCharset[1].toLowerCase();
 					if (charSet != "utf-8") {