From e17af8771437d54f4781defdbc2b501883746021 Mon Sep 17 00:00:00 2001 From: Elad Yosifon Date: Tue, 17 Jul 2018 16:30:53 +0300 Subject: [PATCH] fixing valid mime-type 'text/html;charset=utf-8' --- dom-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom-parser.js b/dom-parser.js index e45dd47..1197b06 100644 --- a/dom-parser.js +++ b/dom-parser.js @@ -10,7 +10,7 @@ DOMParser.prototype.parseFromString = function(source,mimeType){ var errorHandler = options.errorHandler; var locator = options.locator; var defaultNSMap = options.xmlns||{}; - var isHTML = /\/x?html?$/.test(mimeType);//mimeType.toLowerCase().indexOf('html') > -1; + var isHTML = mimeType.toLowerCase().indexOf('html') > -1; var entityMap = isHTML?htmlEntity.entityMap:{'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"}; if(locator){ domBuilder.setDocumentLocator(locator)