diff --git a/internal/sub/controller.go b/internal/sub/controller.go
index 828eafc66..587a02c77 100644
--- a/internal/sub/controller.go
+++ b/internal/sub/controller.go
@@ -546,15 +546,17 @@ func (a *SUBController) serveSubscriptionCopyPage(c *gin.Context) {
{{TITLE}}
-
+
{{HEADING}}
{{INSTRUCTIONS}}
diff --git a/internal/sub/controller_browser_test.go b/internal/sub/controller_browser_test.go
index a86474869..42f589cf6 100644
--- a/internal/sub/controller_browser_test.go
+++ b/internal/sub/controller_browser_test.go
@@ -105,6 +105,28 @@ func TestSubscriptionCopyPageUsesRequestLocale(t *testing.T) {
}
}
+func TestSubscriptionCopyPageIsMobileSafe(t *testing.T) {
+ w := httptest.NewRecorder()
+ c, _ := gin.CreateTestContext(w)
+ c.Request = httptest.NewRequest(http.MethodGet, "/sub/abc", nil)
+
+ (&SUBController{}).serveSubscriptionCopyPage(c)
+ body := w.Body.String()
+ for _, required := range []string{
+ ``,
+ `* { box-sizing: border-box; }`,
+ `min-height: 100dvh`,
+ `overflow-x: hidden`,
+ `overflow-wrap: anywhere`,
+ `@media (max-width: 480px)`,
+ ``,
+ } {
+ if !strings.Contains(body, required) {
+ t.Fatalf("copy page is missing mobile layout constraint %q", required)
+ }
+ }
+}
+
func TestExplicitSubPageRequest(t *testing.T) {
gin.SetMode(gin.TestMode)