diff --git a/.changeset/slow-mugs-matter.md b/.changeset/slow-mugs-matter.md new file mode 100644 index 0000000..73c26de --- /dev/null +++ b/.changeset/slow-mugs-matter.md @@ -0,0 +1,5 @@ +--- +"gruntend-sdk": patch +--- + +safely escaped values can be combined inside quoted attributes while event handlers and tag diff --git a/examples/sveltekit/src/app.css b/examples/sveltekit/src/app.css index bca8c0a..65ff7d7 100644 --- a/examples/sveltekit/src/app.css +++ b/examples/sveltekit/src/app.css @@ -117,13 +117,19 @@ html, body { width: 100%; + min-width: 0; height: 100%; margin: 0; padding: 0; } + html { + overflow-x: clip; + } + body { - overflow: auto; + overflow-x: clip; + overflow-y: auto; background: var(--color-surface); color: var(--color-text-primary); font-family: var(--font-sans); @@ -138,6 +144,12 @@ box-sizing: border-box; } + img, + svg, + video { + max-width: 100%; + } + a { color: inherit; } @@ -885,10 +897,6 @@ } @media (max-width: 1000px) { - body { - overflow: auto; - } - .ps-app-shell { min-height: 100vh; height: auto; diff --git a/examples/sveltekit/src/lib/components/photoship/AppShell.svelte b/examples/sveltekit/src/lib/components/photoship/AppShell.svelte index 7c88475..5ec4594 100644 --- a/examples/sveltekit/src/lib/components/photoship/AppShell.svelte +++ b/examples/sveltekit/src/lib/components/photoship/AppShell.svelte @@ -58,15 +58,17 @@ } -
+
-
+
{@render children?.()}
diff --git a/examples/sveltekit/src/routes/+page.svelte b/examples/sveltekit/src/routes/+page.svelte index 27cb8e2..b4a0de7 100644 --- a/examples/sveltekit/src/routes/+page.svelte +++ b/examples/sveltekit/src/routes/+page.svelte @@ -503,7 +503,7 @@
-
+
@@ -513,32 +513,42 @@ > Restaurant operations

-

+

What do you want to do?

-
+
Menus
{menuCount ?? "…"}
-
+
Items
{itemCount ?? "…"}
-
+
Orders
{orderCount ?? "…"}
-
+
Staff
{teamCount ?? "…"} @@ -566,11 +576,11 @@ placeholder="Move selected dinner items to a new seasonal menu..." >
`, + ); + + expect(Result.isError(compiled)).toBe(true); + expect(compiled.unwrapError()).toEqual({ + code: "unsafe_interpolation", + message: "Interpolations cannot change tag or attribute structure.", + }); +}); + test("compileUiTemplate rejects unsafe tags", () => { const html = createUiTemplateTag();