diff --git a/src/core/Chef.js b/src/core/Chef.js index a64c724a..aba3f4f7 100755 --- a/src/core/Chef.js +++ b/src/core/Chef.js @@ -35,10 +35,11 @@ const Chef = function() { */ Chef.prototype.bake = async function(input, recipeConfig, options, progress, step) { log.debug("Chef baking"); - let startTime = new Date().getTime(), + const startTime = new Date().getTime(), recipe = new Recipe(recipeConfig), containsFc = recipe.containsFlowControl(), - error = false; + notUTF8 = options && options.hasOwnProperty("treatAsUtf8") && !options.treatAsUtf8; + let error = false; if (containsFc && ENVIRONMENT_IS_WORKER()) self.setOption("attemptHighlight", false); @@ -85,8 +86,8 @@ Chef.prototype.bake = async function(input, recipeConfig, options, progress, ste return { result: this.dish.type === Dish.HTML ? - this.dish.get(Dish.HTML, !options.treatAsUtf8) : - this.dish.get(returnType, !options.treatAsUtf8), + this.dish.get(Dish.HTML, notUTF8) : + this.dish.get(returnType, notUTF8), type: Dish.enumLookup(this.dish.type), progress: progress, duration: new Date().getTime() - startTime, diff --git a/src/web/html/index.html b/src/web/html/index.html index dfe586cd..e9f485b3 100755 --- a/src/web/html/index.html +++ b/src/web/html/index.html @@ -373,7 +373,7 @@
- +