commit | 61bb6bfd708db54694fb3ec0d7e4bb5fd9e7f40c | [log] [tgz] |
---|---|---|
author | Prudhvi Krishna Chintala <prudhvikrishna@google.com> | Thu Jul 27 15:40:54 2023 -0700 |
committer | Jamal Carvalho <jamal@golang.org> | Thu Aug 24 19:14:25 2023 +0000 |
tree | c94a01e89b5aa01fa57e4d504f342f401fe32c4a | |
parent | e9f80b83a067cf639e0b7655fb880097c82b803c [diff] |
static/frontend: added fix to validate link text before rendering code will only render links when the link body is not empty. https://screenshot.googleplex.com/5LG3vBJXdKFzaqa.png Change-Id: I4b4bd9223b9623662876be60cbcfb01b65a79ade Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/513855 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Jamal Carvalho <jamal@golang.org> Auto-Submit: Jamal Carvalho <jamal@golang.org> kokoro-CI: kokoro <noreply+kokoro@google.com> Run-TryBot: Jamal Carvalho <jamal@golang.org>
diff --git a/static/frontend/search/search.tmpl b/static/frontend/search/search.tmpl index 2da6909..1251ba3 100644 --- a/static/frontend/search/search.tmpl +++ b/static/frontend/search/search.tmpl
@@ -145,7 +145,7 @@ <div class="SearchSnippet-sub go-textSubtle"> <strong>{{.Heading}}</strong> {{range $i, $v := .Links}} - {{if lt $i 5}} + {{if and (lt $i 5) (ne $v.Body "")}} <a class="go-Chip go-Chip--subtle" href="/{{$v.Href}}" {{if gt $i 4 }}data-hidden="true"{{end}}
diff --git a/tests/screentest/testdata/ci/vuln-nonstdlib-module-540x1080.a.png b/tests/screentest/testdata/ci/vuln-nonstdlib-module-540x1080.a.png index 4582de0..6cb37ba 100644 --- a/tests/screentest/testdata/ci/vuln-nonstdlib-module-540x1080.a.png +++ b/tests/screentest/testdata/ci/vuln-nonstdlib-module-540x1080.a.png Binary files differ
diff --git a/tests/screentest/testdata/ci/vuln-nonstdlib-module.a.png b/tests/screentest/testdata/ci/vuln-nonstdlib-module.a.png index 30b9281..a12de1e 100644 --- a/tests/screentest/testdata/ci/vuln-nonstdlib-module.a.png +++ b/tests/screentest/testdata/ci/vuln-nonstdlib-module.a.png Binary files differ