From c3bb033cc18ab7f1ace2e02a4f3eded8a9be92f2 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Tue, 13 Sep 2016 12:09:04 +0100 Subject: [PATCH] fix(api-builder): escape double-quotes in JSON output --- .../angular.io-package/templates/api-list-audit.template.html | 2 +- .../angular.io-package/templates/api-list-data.template.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/api-builder/angular.io-package/templates/api-list-audit.template.html b/tools/api-builder/angular.io-package/templates/api-list-audit.template.html index 92fe2fcbec..b0610e16f7 100644 --- a/tools/api-builder/angular.io-package/templates/api-list-audit.template.html +++ b/tools/api-builder/angular.io-package/templates/api-list-audit.template.html @@ -6,7 +6,7 @@ "docType": "{$ item.docType $}", "stability": "{$ item.stability $}", "secure": "{$ item.security $}", - "howToUse": "{$ item.howToUse $}", + "howToUse": "{$ item.howToUse | replace('"','\\"') $}", "whatItDoes": {% if item.whatItDoes %}"Exists"{% else %}"Not Done"{% endif %}, "barrel" : "{$ module | replace("/index", "") $}" }{% if not loop.last %},{% endif %} diff --git a/tools/api-builder/angular.io-package/templates/api-list-data.template.html b/tools/api-builder/angular.io-package/templates/api-list-data.template.html index 554091b650..80a424a9a6 100644 --- a/tools/api-builder/angular.io-package/templates/api-list-data.template.html +++ b/tools/api-builder/angular.io-package/templates/api-list-data.template.html @@ -7,7 +7,7 @@ "docType": "{$ item.docType $}", "stability": "{$ item.stability $}", "secure": "{$ item.security $}", - "howToUse": "{$ item.howToUse $}", + "howToUse": "{$ item.howToUse | replace('"','\\"') $}", "whatItDoes": {% if item.whatItDoes %}"Exists"{% else %}"Not Done"{% endif %}, "barrel" : "{$ module | replace("/index", "") $}" }{% if not loop.last %},{% endif %}