Sorry, we don't support your browser.  Install a modern browser

Avoid double JSON encoding in Kirby Blocks#316

The Blocks field stores data in JSON. However, if you have a blocks field within another blocks field, the nested blocks’ data will be double encoded. That’s unnecessary and also ruins indentation:

        "content": {
            "nestedBlocks": "[{\"content\":{\"text\":\"<p>First text block.<\\/p>\"},\"id\":\"63112f8c-dc6a-47c5-9040-6d9d6bc828a7\",\"isHidden\":false,\"type\":\"text\"},{\"content\":{\"text\":\"<p>Second text block.<\\/p>\"},\"id\":\"a1f41e44-6cbb-4e06-8470-82b3665c93dd\",\"isHidden\":false,\"type\":\"text\"}]"
        "id": "86a09cb5-7311-43b1-a4cb-03348af17092",
        "isHidden": false,
        "type": "my-block"

This increases the file size of the TXT and renders Git diffs useless.

2 months ago