Escape quotes when they appear as HTML entities in JSX text

Fixes #6241
This commit is contained in:
Ryan Cavanaugh
2015-12-29 12:39:27 -08:00
parent 72bb1d3dec
commit e12855bca0
5 changed files with 15 additions and 1 deletions
+3 -1
View File
@@ -7221,7 +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) {
return String.fromCharCode(entities[m]);
let ch = String.fromCharCode(entities[m]);
// " needs to be escaped
return ch === '"' ? '\\"' : ch;
}
else {
return s;