/internal/godoc/dochtml/internal/render: fix tests

Tip is failing some doc rendering tests because smart quotes
are being replaced with more standard characters.
Change the tests to allow either string.

For golang/go#76975.
For golang/go#80432.

Change-Id: Ibc508c39eb4785515d98b4eaf4fce299831b4924
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/801520
kokoro-CI: kokoro <noreply+kokoro@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ethan Lee <ethanalee@google.com>
Auto-Submit: Jonathan Amsterdam <jba@google.com>
diff --git a/internal/godoc/dochtml/internal/render/linkify_test.go b/internal/godoc/dochtml/internal/render/linkify_test.go
index c6627ec..8398adf 100644
--- a/internal/godoc/dochtml/internal/render/linkify_test.go
+++ b/internal/godoc/dochtml/internal/render/linkify_test.go
@@ -76,9 +76,17 @@
 						wantLinks = getContent("links")
 					}
 					if diff := cmp.Diff(want, got); diff != "" {
-						t.Errorf("doc mismatch (-want +got)\n%s", diff)
-						t.Logf("want: %s", want)
-						t.Logf("got: %s", got)
+						// As of 16-July-2026, tip replaces smart quotes with ASCII.
+						// We must try both variants so tests pass on old and new Go versions.
+						// TODO(golang/go#80432): remove after builders no longer run old code (circa July 2027).
+						want2 := strings.NewReplacer("“", "``", "”", "&#39;&#39;").Replace(want)
+						if diff2 := cmp.Diff(want2, got); diff2 != "" {
+							t.Errorf("doc mismatch (old) (-want +got)\n%s", diff)
+							t.Errorf("doc mismatch (new) (-want +got)\n%s", diff2)
+							t.Logf("want (old): %s", want)
+							t.Logf("want (new): %s", want2)
+							t.Logf("got: %s", got)
+						}
 					}
 					var b strings.Builder
 					for _, l := range r.Links() {