Merge "Support mailto: references"
diff --git a/WORKSPACE b/WORKSPACE
index ddf8621..5085997 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -51,37 +51,37 @@
     sha1 = "b8ba1c1eb8b2e45cfd465d01218c6060e887572e",
 )
 
-COMMONMARK_VERSION = "0.9.0"
+COMMONMARK_VERSION = "0.10.0"
 
 # When upgrading commonmark it should also be updated in plugins/gitiles
 maven_jar(
     name = "commonmark",
     artifact = "com.atlassian.commonmark:commonmark:" + COMMONMARK_VERSION,
-    sha1 = "4eb11e3f9aaecafc6073b84c15f66376ef8dc5d3",
+    sha1 = "119cb7bedc3570d9ecb64ec69ab7686b5c20559b",
 )
 
 maven_jar(
     name = "cm_autolink",
     artifact = "com.atlassian.commonmark:commonmark-ext-autolink:" + COMMONMARK_VERSION,
-    sha1 = "b81d7f0e2bdb987d3f447f3e92756bcdbb5ff537",
+    sha1 = "a6056a5efbd68f57d420bc51bbc54b28a5d3c56b",
 )
 
 maven_jar(
     name = "autolink",
-    artifact = "org.nibor.autolink:autolink:0.6.0",
-    sha1 = "3986d016a14e8c81afeec752f19af29b20e8367b",
+    artifact = "org.nibor.autolink:autolink:0.7.0",
+    sha1 = "649f9f13422cf50c926febe6035662ae25dc89b2",
 )
 
 maven_jar(
     name = "gfm_strikethrough",
     artifact = "com.atlassian.commonmark:commonmark-ext-gfm-strikethrough:" + COMMONMARK_VERSION,
-    sha1 = "d6814aac1a6aaa473c0c3ef0a23bfff8836d1e67",
+    sha1 = "40837da951b421b545edddac57012e15fcc9e63c",
 )
 
 maven_jar(
     name = "gfm_tables",
     artifact = "com.atlassian.commonmark:commonmark-ext-gfm-tables:" + COMMONMARK_VERSION,
-    sha1 = "4c8a93ef905ef8fc35d6379965641a980d67e304",
+    sha1 = "c075db2a3301100cf70c7dced8ecf86b494458a2",
 )
 
 maven_jar(
@@ -98,8 +98,8 @@
 
 maven_jar(
     name = "truth",
-    artifact = "com.google.truth:truth:0.32",
-    sha1 = "e996fb4b41dad04365112786796c945f909cfdf7",
+    artifact = "com.google.truth:truth:0.35",
+    sha1 = "c08a7fde45e058323bcfa3f510d4fe1e2b028f37",
 )
 
 maven_jar(
diff --git a/resources/com/google/gitiles/templates/BlameDetail.soy b/resources/com/google/gitiles/templates/BlameDetail.soy
index 909ee0f..467f5af 100644
--- a/resources/com/google/gitiles/templates/BlameDetail.soy
+++ b/resources/com/google/gitiles/templates/BlameDetail.soy
@@ -35,7 +35,7 @@
  *       class: class name for tr.
  *     All keys but "class" are optional.
  */
-{template .blameDetail}
+{template .blameDetail stricthtml="false"}
 {if $regions}
   {call .header data="all"}
     {param css: [gitiles.PRETTIFY_CSS_URL] /}
@@ -52,7 +52,7 @@
         {if isNonnull($region.abbrevSha)}
           <td class="Blame-author">{$region.author.name}</td>
           <td class="Blame-sha1"><a class="u-sha1 u-monospace Blame-sha1" href="{$region.commitUrl}">{$region.abbrevSha}</a></td>
-          <td class="Blame-time">{$region.author.time}</span>
+          <td class="Blame-time">{$region.author.time}</td>
           <td class="Blame-regionLink">
             [<a href="{$region.diffUrl}">{msg desc="text for diff URL"}diff{/msg}</a>]
             [<a href="{$region.blameUrl}">{msg desc="text for blame URL"}{$region.blameText}{/msg}</a>]
diff --git a/resources/com/google/gitiles/templates/Common.soy b/resources/com/google/gitiles/templates/Common.soy
index ca3e21f..1699443 100644
--- a/resources/com/google/gitiles/templates/Common.soy
+++ b/resources/com/google/gitiles/templates/Common.soy
@@ -26,7 +26,7 @@
  * @param? css optional list of CSS URLs to include.
  * @param? containerClass optional class to append to the main container.
  */
-{template .header}
+{template .header stricthtml="false"}
 <!DOCTYPE html>
 <html lang="en">
 <head>
@@ -150,7 +150,7 @@
  *
  * @param? customVariant variant name for custom styling.
  */
-{template .footer}
+{template .footer stricthtml="false"}
     </div> <!-- Container -->
   </div> <!-- Site-content -->
   {delcall gitiles.customFooter variant="$customVariant ?: ''" /}
@@ -165,5 +165,5 @@
  * Renderer#renderStreaming(HttpServletResponse, String).
  */
 {template .streamingPlaceholder}
-<div id="STREAMED_OUTPUT_BLOCK" />
+<br id="STREAMED_OUTPUT_BLOCK">
 {/template}
diff --git a/resources/com/google/gitiles/templates/DiffDetail.soy b/resources/com/google/gitiles/templates/DiffDetail.soy
index 252ab7b..893d8ae 100644
--- a/resources/com/google/gitiles/templates/DiffDetail.soy
+++ b/resources/com/google/gitiles/templates/DiffDetail.soy
@@ -24,7 +24,7 @@
  * @param? commit optional commit for which diffs are displayed, with keys
  *     corresponding to the gitiles.commitDetail template (minus "diffTree").
  */
-{template .diffDetail}
+{template .diffDetail stricthtml="false"}
 {call .header data="all" /}
 
 {if $commit}
diff --git a/resources/com/google/gitiles/templates/Doc.soy b/resources/com/google/gitiles/templates/Doc.soy
index 8d73789..e565819 100644
--- a/resources/com/google/gitiles/templates/Doc.soy
+++ b/resources/com/google/gitiles/templates/Doc.soy
@@ -71,6 +71,7 @@
         {if $sourceUrl}<a class="Footer-link" href="{$sourceUrl}">{msg desc="text for the source link"}source{/msg}</a>{/if}
         {if $logUrl}<a class="Footer-link" href="{$logUrl}">{msg desc="text for the log link"}log{/msg}</a>{/if}
         {if $blameUrl}<a class="Footer-link" href="{$blameUrl}">{msg desc="text for the blame link"}blame{/msg}</a>{/if}
+      </div>
     </div>
   </footer>
   {if $analyticsId}
diff --git a/resources/com/google/gitiles/templates/HostIndex.soy b/resources/com/google/gitiles/templates/HostIndex.soy
index ab3b18c..263c9f5 100644
--- a/resources/com/google/gitiles/templates/HostIndex.soy
+++ b/resources/com/google/gitiles/templates/HostIndex.soy
@@ -24,7 +24,7 @@
  * @param repositories list of repository description maps with name, cloneUrl,
  *     and optional description values.
  */
-{template .hostIndex}
+{template .hostIndex stricthtml="false"}
 {call .header}
   {param title: $prefix ? $prefix : $hostName ? $hostName + ' Git repositories' : 'Git repositories' /}
   {param menuEntries: $menuEntries /}
diff --git a/resources/com/google/gitiles/templates/LogDetail.soy b/resources/com/google/gitiles/templates/LogDetail.soy
index be7c9b3..bfbcba1 100644
--- a/resources/com/google/gitiles/templates/LogDetail.soy
+++ b/resources/com/google/gitiles/templates/LogDetail.soy
@@ -24,7 +24,7 @@
  * @param? tags optional list of tags encountered when peeling this object, with
  *     keys corresponding to gitiles.tagDetail.
  */
-{template .logDetail}
+{template .logDetail stricthtml="false"}
 {call .header data="all" /}
 
 {if $tags}
@@ -46,7 +46,7 @@
  *
  * @param? previousUrl URL for the previous page of results.
  */
-{template .logEntriesHeader}
+{template .logEntriesHeader stricthtml="false"}
 {if $previousUrl}
   <nav class="LogNav">
     <a class="LogNav-prev" href="{$previousUrl}">{msg desc="text for previous URL"}&laquo; Previous{/msg}</a>
@@ -75,7 +75,7 @@
  *
  * @param? nextUrl URL for the next page of results.
  */
-{template .logEntriesFooter}
+{template .logEntriesFooter stricthtml="false"}
 </ol>
 {if $nextUrl}
   <nav class="LogNav">
@@ -89,7 +89,7 @@
  * Single log entry indicating the full log is empty.
  */
 {template .emptyLog}
-<li class="CommitLog-item CommitLog-item--empty">{msg desc="informational text for when the log is empty"}No commits.{/msg}</p>
+<li class="CommitLog-item CommitLog-item--empty">{msg desc="informational text for when the log is empty"}No commits.{/msg}</li>
 {/template}
 
 
diff --git a/resources/com/google/gitiles/templates/PathDetail.soy b/resources/com/google/gitiles/templates/PathDetail.soy
index c4c5d5f..9cf0703 100644
--- a/resources/com/google/gitiles/templates/PathDetail.soy
+++ b/resources/com/google/gitiles/templates/PathDetail.soy
@@ -26,7 +26,7 @@
  * @param data path data, matching the params for one of .treeDetail,
  *     .blobDetail, .symlinkDetail, or .gitlinkDetail as appropriate.
  */
-{template .pathDetail}
+{template .pathDetail stricthtml="false"}
 {if $type == 'REGULAR_FILE' or $type == 'EXECUTABLE_FILE'}
   {call .header data="all"}
     {param css: [gitiles.PRETTIFY_CSS_URL] /}
diff --git a/resources/com/google/gitiles/templates/RefList.soy b/resources/com/google/gitiles/templates/RefList.soy
index be9c94a..cd29baf 100644
--- a/resources/com/google/gitiles/templates/RefList.soy
+++ b/resources/com/google/gitiles/templates/RefList.soy
@@ -24,7 +24,7 @@
  * @param branches list of branch objects with url, name, and isHead keys.
  * @param tags list of tag objects with url and name keys.
  */
-{template .refsDetail}
+{template .refsDetail stricthtml="false"}
 {call .header}
   {param title: 'Refs' /}
   {param repositoryName: $repositoryName /}
diff --git a/resources/com/google/gitiles/templates/RepositoryIndex.soy b/resources/com/google/gitiles/templates/RepositoryIndex.soy
index 78f5b79..a7d9c54 100644
--- a/resources/com/google/gitiles/templates/RepositoryIndex.soy
+++ b/resources/com/google/gitiles/templates/RepositoryIndex.soy
@@ -30,7 +30,7 @@
  * @param hasLog whether a log should be shown for HEAD.
  * @param? readmeHtml optional rendered README.md contents.
  */
-{template .repositoryIndex}
+{template .repositoryIndex stricthtml="false"}
 {if $readmeHtml}
   {call .header data="all"}
     {param title: $repositoryName /}
diff --git a/resources/com/google/gitiles/templates/RevisionDetail.soy b/resources/com/google/gitiles/templates/RevisionDetail.soy
index 2bfabe0..335ec8d 100644
--- a/resources/com/google/gitiles/templates/RevisionDetail.soy
+++ b/resources/com/google/gitiles/templates/RevisionDetail.soy
@@ -29,7 +29,7 @@
  *     with an object whose keys correspond to the appropriate object detail
  *     template from ObjectDetail.soy.
  */
-{template .revisionDetail}
+{template .revisionDetail stricthtml="false"}
 {if $hasBlob}
   {call .header data="all"}
     {param css: [gitiles.PRETTIFY_CSS_URL] /}