瀏覽代碼

fix infinite loop

Gildas 5 年之前
父節點
當前提交
a22fa89127
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/single-file/single-file-core.js

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

@@ -448,7 +448,7 @@ class Processor {
 					charset = charsetDeclaration.split("=")[1].trim().toLowerCase();
 					charset = charsetDeclaration.split("=")[1].trim().toLowerCase();
 				}
 				}
 			});
 			});
-			if (charset && charset != content.charset) {
+			if (charset && charset.toLowerCase() != content.charset.toLowerCase()) {
 				return this.loadPage(pageContent, charset);
 				return this.loadPage(pageContent, charset);
 			}
 			}
 		}
 		}