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

View File

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

View File

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

View File

@@ -21,7 +21,7 @@
* adding a new SSH or GPG key to an account. * adding a new SSH or GPG key to an account.
* @param email * @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 One or more new {$email.keyType} keys have been added to Gerrit Code Review at
{sp}{$email.gerritHost}: {sp}{$email.gerritHost}:
@@ -68,4 +68,4 @@
This is a send-only email address. Replies to this message will not be read This is a send-only email address. Replies to this message will not be read
or answered. or answered.
{/template} {/template}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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