Explorar o código

take into account the charset attrinute of link tags

Gildas %!s(int64=7) %!d(string=hai) anos
pai
achega
b5d84945e2
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      lib/single-file/single-file-core.js

+ 3 - 0
lib/single-file/single-file-core.js

@@ -753,6 +753,9 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 					} else {
 						let stylesheetContent;
 						if (isLinkTag) {
+							if (element.charset) {
+								options.charSet = element.charset;
+							}
 							stylesheetContent = await DomProcessorHelper.resolveLinkStylesheetURLs(element.href, this.baseURI, options);
 						} else {
 							stylesheetContent = await DomProcessorHelper.resolveImportURLs(element.textContent, this.baseURI, options);