docs/config: Fix problem with HTML entities in template example Since the default kind for soy template is html, certain characters in the subject would be encoded as HTML and appear as e.g. "&" instead of "&" in the link text. By using the "text" kind and the pre-escaped subject the link title is as expected. Change-Id: Ibe1eb6237af18d3d4b955fff9b68da4193240a93
diff --git a/src/main/resources/Documentation/config.md b/src/main/resources/Documentation/config.md index 5214732..eeaff61 100644 --- a/src/main/resources/Documentation/config.md +++ b/src/main/resources/Documentation/config.md
@@ -298,9 +298,9 @@ ``` {namespace etc.its.templates} -{template link} +{template link kind="text"} {@param changeUrl: string} - {@param subject: string} + {@param escapedSubject: string} {@param status: string} {lb} "globalId": "{$changeUrl}", @@ -310,23 +310,17 @@ {rb}, "object": {lb} "url": "{$changeUrl}", - "title": "{$subject}", + "title": "{$escapedSubject}", "icon": {lb} "url16x16": "https://www.gerritcodereview.com/images/diffy_logo.png", "title": "Review" {rb}, "status": {lb} {switch $status} - {case null} - "resolved": false - {case 'NEW'} - "resolved": false - {case 'SUBMITTED'} - "resolved": false - {case 'MERGED'} + {case 'MERGED', 'ABANDONED'} "resolved": true - {case 'ABANDONED'} - "resolved": true + {default} + "resolved": false {/switch} {rb} {rb}