Álvaro Tejero-Cantero 3b3669b63b
🐛 Drop map-valued svg attrs when migrating legacy files (#13130)
Files written by old Penpot versions hold maps where an svg
attribute value should be, such as a `:filter` that once read
`url(#filter_2)`. Since #12006 the `:svg-attrs` schema is closed and
admits scalars only, and migration 0035 kept those maps, so the file
data check at the end of every migration rejected the file. Such a
file can be neither imported nor opened. Two built-in templates,
Avataaars and Tutorial for beginners, are among them.

`attrs->kebab-props` now drops a value that is not a string, a number,
or a boolean, at the top level and inside `:style`. Migration 0035 and
every birth path go through it, so stored attrs match the schema.

Of the 143 files in penpot/penpot-files, 4 fail to import at
`:svg-attrs :filter` before this change, and all 4 import after it.

AI-assisted-by: claude-opus-5-5
2026-11-18 09:31:39 +01:00
..
2026-09-22 10:22:31 +02:00
2026-09-29 09:07:34 +02:00
2026-03-11 15:24:40 +01:00