Mark <link href=""> with |blessStringAsTrustedResourceUrlForLegacy. Soy is about to require trusted_resource_url in <link href="">. This change prepares for that by blessing existing string URLs. PiperOrigin-RevId: 189717626 Change-Id: I736fc35d8ec9f412d75f0ce52121e4924fb41719
diff --git a/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy b/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy index a013140..572c08d 100644 --- a/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy +++ b/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy
@@ -50,8 +50,8 @@ <link rel="preload" href="{$staticResourcePath}/fonts/Roboto-Regular.woff" as="font" type="font/woff" crossorigin>{\n} <link rel="preload" href="{$staticResourcePath}/fonts/Roboto-Medium.woff2" as="font" type="font/woff2" crossorigin>{\n} <link rel="preload" href="{$staticResourcePath}/fonts/Roboto-Medium.woff" as="font" type="font/woff" crossorigin>{\n} - <link rel="stylesheet" href="{$staticResourcePath}/styles/fonts.css">{\n} - <link rel="stylesheet" href="{$staticResourcePath}/styles/main.css">{\n} + <link rel="stylesheet" href="{$staticResourcePath |blessStringAsTrustedResourceUrlForLegacy}/styles/fonts.css">{\n} + <link rel="stylesheet" href="{$staticResourcePath |blessStringAsTrustedResourceUrlForLegacy}/styles/main.css">{\n} <script src="{$staticResourcePath}/bower_components/webcomponentsjs/webcomponents-lite.js"></script>{\n} // Content between webcomponents-lite and the load of the main app element // run before polymer-resin is installed so may have security consequences. @@ -60,7 +60,7 @@ // // github.com/Polymer/polymer-resin/blob/master/getting-started.md#integrating <link rel="preload" href="{$staticResourcePath}/elements/gr-app.js" as="script" crossorigin="anonymous">{\n} - <link rel="import" href="{$staticResourcePath}/elements/gr-app.html">{\n} + <link rel="import" href="{$staticResourcePath |blessStringAsTrustedResourceUrlForLegacy}/elements/gr-app.html">{\n} <body unresolved>{\n} <gr-app id="app"></gr-app>{\n}
diff --git a/resources/com/google/gerrit/server/mail/ChangeFooterHtml.soy b/resources/com/google/gerrit/server/mail/ChangeFooterHtml.soy index 99263e8..f802366 100644 --- a/resources/com/google/gerrit/server/mail/ChangeFooterHtml.soy +++ b/resources/com/google/gerrit/server/mail/ChangeFooterHtml.soy
@@ -38,7 +38,7 @@ {if $email.changeUrl} <div itemscope itemtype="http://schema.org/EmailMessage"> <div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"> - <link itemprop="url" href="{$email.changeUrl}"/> + <link itemprop="url" href="{$email.changeUrl |blessStringAsTrustedResourceUrlForLegacy}"/> <meta itemprop="name" content="View Change"/> </div> </div>