Remove autoescape from Soy templates

This is now the default and can be removed.

Change-Id: I5e56d326b6ba233a51ce69146b9e4a05a8404711
This commit is contained in:
Patrick Hiesel
2017-10-02 11:20:02 +01:00
parent 7963d72c76
commit da5a8ed16b
33 changed files with 42 additions and 42 deletions

View File

@@ -21,7 +21,7 @@
* @param staticResourcePath
* @param? versionInfo
*/
{template .Index autoescape="strict" kind="html"}
{template .Index kind="html"}
<!DOCTYPE html>{\n}
<html lang="en">{\n}
<meta charset="utf-8">{\n}

View File

@@ -24,7 +24,7 @@
* @param email
* @param fromName
*/
{template .Abandoned autoescape="strict" kind="text"}
{template .Abandoned kind="text"}
{$fromName} has abandoned this change.
{if $email.changeUrl} ( {$email.changeUrl} ){/if}{\n}
{\n}

View File

@@ -21,7 +21,7 @@
* @param email
* @param fromName
*/
{template .AbandonedHtml autoescape="strict" kind="html"}
{template .AbandonedHtml kind="html"}
<p>
{$fromName} <strong>abandoned</strong> this change.
</p>

View File

@@ -21,7 +21,7 @@
* adding a new SSH or GPG key to an account.
* @param email
*/
{template .AddKey autoescape="strict" kind="text"}
{template .AddKey kind="text"}
One or more new {$email.keyType} keys have been added to Gerrit Code Review at
{sp}{$email.gerritHost}:

View File

@@ -19,7 +19,7 @@
/**
* @param email
*/
{template .AddKeyHtml autoescape="strict" kind="html"}
{template .AddKeyHtml kind="html"}
<p>
One or more new {$email.keyType} keys have been added to Gerrit Code Review
at {$email.gerritHost}:

View File

@@ -21,7 +21,7 @@
* that will be appended to ALL emails related to changes.
* @param email
*/
{template .ChangeFooter autoescape="strict" kind="text"}
{template .ChangeFooter kind="text"}
--{sp}
{\n}

View File

@@ -20,7 +20,7 @@
* @param change
* @param email
*/
{template .ChangeFooterHtml autoescape="strict" kind="html"}
{template .ChangeFooterHtml kind="html"}
{if $email.changeUrl or $email.settingsUrl}
<p>
{if $email.changeUrl}

View File

@@ -23,6 +23,6 @@
* @param change
* @param shortProjectName
*/
{template .ChangeSubject autoescape="strict" kind="text"}
{template .ChangeSubject kind="text"}
Change in {$shortProjectName}[{$branch.shortName}]: {$change.shortSubject}
{/template}

View File

@@ -25,7 +25,7 @@
* @param fromName
* @param commentFiles
*/
{template .Comment autoescape="strict" kind="text"}
{template .Comment kind="text"}
{$fromName} has posted comments on this change.
{if $email.changeUrl} ( {$email.changeUrl} ){/if}{\n}
{\n}

View File

@@ -21,5 +21,5 @@
* that will be appended to emails related to a user submitting comments on
* changes.
*/
{template .CommentFooter autoescape="strict" kind="text"}
{template .CommentFooter kind="text"}
{/template}

View File

@@ -16,5 +16,5 @@
{namespace com.google.gerrit.server.mail.template}
{template .CommentFooterHtml autoescape="strict" kind="html"}
{template .CommentFooterHtml kind="html"}
{/template}

View File

@@ -24,7 +24,7 @@
* @param patchSet
* @param patchSetCommentBlocks
*/
{template .CommentHtml autoescape="strict" kind="html"}
{template .CommentHtml kind="html"}
{let $commentHeaderStyle kind="css"}
margin-bottom: 4px;
{/let}

View File

@@ -24,7 +24,7 @@
* @param email
* @param fromName
*/
{template .DeleteReviewer autoescape="strict" kind="text"}
{template .DeleteReviewer kind="text"}
{$fromName} has removed{sp}
{foreach $reviewerName in $email.reviewerNames}
{if not isFirst($reviewerName)},{sp}{/if}

View File

@@ -20,7 +20,7 @@
* @param email
* @param fromName
*/
{template .DeleteReviewerHtml autoescape="strict" kind="html"}
{template .DeleteReviewerHtml kind="html"}
<p>
{$fromName}{sp}
<strong>

View File

@@ -23,7 +23,7 @@
* @param coverLetter
* @param fromName
*/
{template .DeleteVote autoescape="strict" kind="text"}
{template .DeleteVote kind="text"}
{$fromName} has removed a vote on this change.{\n}
{\n}
Change subject: {$change.subject}{\n}

View File

@@ -21,7 +21,7 @@
* @param email
* @param fromName
*/
{template .DeleteVoteHtml autoescape="strict" kind="html"}
{template .DeleteVoteHtml kind="html"}
<p>
{$fromName} <strong>removed a vote</strong> from this change.
</p>

View File

@@ -22,7 +22,7 @@
* CommentFooter.
* @param footers
*/
{template .Footer autoescape="strict" kind="text"}
{template .Footer kind="text"}
{foreach $footer in $footers}
{$footer}{\n}
{/foreach}

View File

@@ -19,7 +19,7 @@
/**
* @param footers
*/
{template .FooterHtml autoescape="strict" kind="html"}
{template .FooterHtml kind="html"}
{\n}
{\n}
{foreach $footer in $footers}

View File

@@ -16,5 +16,5 @@
{namespace com.google.gerrit.server.mail.template}
{template .HeaderHtml autoescape="strict" kind="html"}
{template .HeaderHtml kind="html"}
{/template}

View File

@@ -24,7 +24,7 @@
* @param email
* @param fromName
*/
{template .Merged autoescape="strict" kind="text"}
{template .Merged kind="text"}
{$fromName} has submitted this change and it was merged.
{if $email.changeUrl} ( {$email.changeUrl} ){/if}{\n}
{\n}

View File

@@ -21,7 +21,7 @@
* @param email
* @param fromName
*/
{template .MergedHtml autoescape="strict" kind="html"}
{template .MergedHtml kind="html"}
<p>
{$fromName} <strong>merged</strong> this change.
</p>

View File

@@ -25,7 +25,7 @@
* @param patchSet
* @param projectName
*/
{template .NewChange autoescape="strict" kind="text"}
{template .NewChange kind="text"}
{if $email.reviewerNames}
Hello{sp}
{foreach $reviewerName in $email.reviewerNames}

View File

@@ -24,7 +24,7 @@
* @param patchSet
* @param projectName
*/
{template .NewChangeHtml autoescape="strict" kind="html"}
{template .NewChangeHtml kind="html"}
<p>
{if $email.reviewerNames}
{$fromName} would like{sp}

View File

@@ -24,7 +24,7 @@
* Private template to generate "View Change" buttons.
* @param email
*/
{template .ViewChangeButton autoescape="strict" kind="html"}
{template .ViewChangeButton kind="html"}
<a href="{$email.changeUrl}">View Change</a>
{/template}
@@ -32,7 +32,7 @@
* Private template to render PRE block with consistent font-sizing.
* @param content
*/
{template .Pre autoescape="strict" kind="html"}
{template .Pre kind="html"}
{let $preStyle kind="css"}
font-family: monospace,monospace; // Use this to avoid browsers scaling down
// monospace text.
@@ -56,7 +56,7 @@
*
* @param content
*/
{template .WikiFormat autoescape="strict" kind="html"}
{template .WikiFormat kind="html"}
{let $blockquoteStyle kind="css"}
border-left: 1px solid #aaa;
margin: 10px 0;
@@ -90,7 +90,7 @@
/**
* @param diffLines
*/
{template .UnifiedDiff autoescape="strict" kind="html"}
{template .UnifiedDiff kind="html"}
{let $addStyle kind="css"}
color: hsl(120, 100%, 40%);
{/let}

View File

@@ -21,7 +21,7 @@
* related to registering new email accounts.
* @param email
*/
{template .RegisterNewEmail autoescape="strict" kind="text"}
{template .RegisterNewEmail kind="text"}
Welcome to Gerrit Code Review at {$email.gerritHost}.{\n}
{\n}

View File

@@ -26,7 +26,7 @@
* @param patchSet
* @param projectName
*/
{template .ReplacePatchSet autoescape="strict" kind="text"}
{template .ReplacePatchSet kind="text"}
{if $email.reviewerNames and $fromEmail == $change.ownerEmail}
Hello{sp}
{foreach $reviewerName in $email.reviewerNames}

View File

@@ -24,7 +24,7 @@
* @param patchSet
* @param projectName
*/
{template .ReplacePatchSetHtml autoescape="strict" kind="html"}
{template .ReplacePatchSetHtml kind="html"}
<p>
{$fromName} <strong>uploaded patch set #{$patchSet.patchSetId}</strong>{sp}
to{sp}

View File

@@ -24,7 +24,7 @@
* @param email
* @param fromName
*/
{template .Restored autoescape="strict" kind="text"}
{template .Restored kind="text"}
{$fromName} has restored this change.
{if $email.changeUrl} ( {$email.changeUrl} ){/if}{\n}
{\n}

View File

@@ -20,7 +20,7 @@
* @param email
* @param fromName
*/
{template .RestoredHtml autoescape="strict" kind="html"}
{template .RestoredHtml kind="html"}
<p>
{$fromName} <strong>restored</strong> this change.
</p>

View File

@@ -24,7 +24,7 @@
* @param email
* @param fromName
*/
{template .Reverted autoescape="strict" kind="text"}
{template .Reverted kind="text"}
{$fromName} has reverted this change.
{if $email.changeUrl} ( {$email.changeUrl} ){/if}{\n}
{\n}

View File

@@ -20,7 +20,7 @@
* @param email
* @param fromName
*/
{template .RevertedHtml autoescape="strict" kind="html"}
{template .RevertedHtml kind="html"}
<p>
{$fromName} <strong>reverted</strong> this change.
</p>

View File

@@ -25,7 +25,7 @@
* @param patchSet
* @param projectName
*/
{template .SetAssignee autoescape="strict" kind="text"}
{template .SetAssignee kind="text"}
Hello{sp}
{$email.assigneeName},

View File

@@ -23,7 +23,7 @@
* @param patchSet
* @param projectName
*/
{template .SetAssigneeHtml autoescape="strict" kind="html"}
{template .SetAssigneeHtml kind="html"}
<p>
{$fromName} has <strong>assigned</strong> a change to{sp}
{$email.assigneeName}.{sp}