diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 77a9b658f74..c266a0fa77e 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -7221,9 +7221,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi // Replace entities like   result = result.replace(/&(\w+);/g, function(s: any, m: string) { if (entities[m] !== undefined) { - let ch = String.fromCharCode(entities[m]); + const ch = String.fromCharCode(entities[m]); // " needs to be escaped - return ch === '"' ? '\\"' : ch; + return ch === "\"" ? "\\\"" : ch; } else { return s;